Skip to content

Commit

Permalink
adds a task for recalculating the proposals hot_score
Browse files Browse the repository at this point in the history
  • Loading branch information
kikito committed Nov 17, 2015
1 parent 0277106 commit 4987da2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/tasks/proposals.rake
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4987da2

Please sign in to comment.