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.

7 lines
300 B

desc "Sets value for collection_year log validations depending on the from value"
task set_log_validation_collection_year: :environment do
LogValidation.all.each do |log_validation|
log_validation.update(collection_year: "#{log_validation.from.year}/#{log_validation.from.year + 1}")
end
end