mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2025-04-20 07:11:33 +02:00
Add Paper model, Paper.import_from_csv
This commit is contained in:
parent
f661631dd9
commit
d39f00165e
4 changed files with 56 additions and 1 deletions
7
lib/tasks/import_papers.rake
Normal file
7
lib/tasks/import_papers.rake
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue