stadtratmonitor/lib/tasks/import_papers.rake

11 lines
257 B
Ruby
Raw Normal View History

2015-04-13 22:09:28 +02:00
namespace :import_papers do
desc 'Import Paper records from CSV'
task :from_morph => :environment do
require 'open-uri'
Importer.all.each do |importer|
uri = URI.parse(importer.url)
Paper.import_from_json(uri.read)
end
2015-04-13 22:09:28 +02:00
end
end