Add Paper model, Paper.import_from_csv

This commit is contained in:
Andreas Haller 2015-04-13 22:09:28 +02:00
parent f661631dd9
commit d39f00165e
4 changed files with 56 additions and 1 deletions

View file

@ -0,0 +1,7 @@
namespace :import_papers do
desc 'Import Paper records from CSV'
task :from_csv, [:csv_file] => :environment do |t, args|
Paper.import_from_csv(File.read(args[:csv_file]))
end
end