Use application logger in set_original_heading_id

The pull request adding the original heading was done before we started
using `ApplicationLogger` in rake tasks.
This commit is contained in:
Javi Martín
2019-10-08 20:37:25 +02:00
parent 4fad6f16f6
commit 0a2efb1d80

View File

@@ -15,14 +15,13 @@ namespace :budgets do
desc "Update investments original_heading_id with current heading_id"
task set_original_heading_id: :environment do
puts "Starting"
ApplicationLogger.new.info "Setting original_heading_id to investments"
Budget::Investment.find_each do |investment|
unless investment.original_heading_id.present?
investment.update_column(:original_heading_id, investment.heading_id)
end
print "."
end
puts "Finished"
end
end