Commit 024ced8a3f6b4c4486866f25ff2875a103dfd882

Authored by Luke Baker
1 parent 408763a6

update cache updater to accurately update prompts

Showing 1 changed file with 2 additions and 4 deletions   Show diff stats
lib/tasks/prune_db.rake
... ... @@ -214,11 +214,9 @@ namespace :prune_db do
214 214 Question.all.each do |question|
215 215 question.choices.each do |choice|
216 216 choice.reload
217   - choice.prompts_on_the_left
218   - choice.prompts_on_the_right
219 217 Choice.update_counters choice.id,
220   - :prompts_on_the_left_count => choice.prompts_on_the_left.count,
221   - :prompts_on_the_right_count => choice.prompts_on_the_right.count
  218 + :prompts_on_the_left_count => choice.prompts_on_the_left.count - choice.prompts_on_the_left_count,
  219 + :prompts_on_the_right_count => choice.prompts_on_the_right.count - choice.prompts_on_the_right_count
222 220 end
223 221 end
224 222 end
... ...