adds a task for recalculating the proposals hot_score

This commit is contained in:
kikito
2015-11-17 11:14:52 +01:00
parent 0277106a08
commit 4987da2e03

9
lib/tasks/proposals.rake Normal file
View File

@@ -0,0 +1,9 @@
namespace :proposals do
desc "Updates all proposals by recalculating their hot_score"
task hot_score: :environment do
Proposal.find_in_batches do |proposals|
proposals.each(&:save)
end
end
end