Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

13 lines
443 B

namespace :data_import do
desc "Import local authority links data"
task :local_authority_links, %i[path] => :environment do |_task, args|
path = args[:path]
raise "Usage: rake data_import:local_authority_links['path/to/csv_file']" if path.blank?
service = Imports::LocalAuthorityLinksService.new(path:)
service.call
pp "Created/updated #{service.count} local authority link records" unless Rails.env.test?
end
end