Files
openfoodnetwork/lib/tasks/data/remove_transient_data.rake
Maikel Linke c8cfbbb0b2 Use standard ApplicationRecord in task class
It's best practice to use the ApplicationRecord. But when Rake is
loaded, our application is not loaded yet and the ApplicationRecord
class wasn't available yet. Requiring within the task solves the problem
because Rake loads the Rails environment before executing this task.

I also removed the unused highline loading.
2022-09-29 11:56:10 +10:00

12 lines
253 B
Ruby

# frozen_string_literal: true
namespace :ofn do
namespace :data do
desc 'Remove transient data'
task remove_transient_data: :environment do
require 'tasks/data/remove_transient_data'
RemoveTransientData.new.call
end
end
end