adds rake task to touch all spending proposals

(it triggers the recalculating of the tsvector for pg_search)
This commit is contained in:
Juanjo Bazán
2016-03-30 12:11:15 +02:00
parent 207479ec59
commit 948436f130

View File

@@ -10,4 +10,11 @@ namespace :spending_proposals do
end end
end end
end end
desc "Updates all spending proposals to recalculate their tsv column"
task touch: :environment do
SpendingProposal.find_in_batches do |spending_propsal|
spending_propsal.each(&:save)
end
end
end end