mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-23 08:03:14 +01:00
10 lines
257 B
Ruby
10 lines
257 B
Ruby
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
|
|
end
|
|
end
|