Commit 024ced8a3f6b4c4486866f25ff2875a103dfd882
1 parent
408763a6
Exists in
master
and in
1 other branch
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,11 +214,9 @@ namespace :prune_db do | ||
214 | Question.all.each do |question| | 214 | Question.all.each do |question| |
215 | question.choices.each do |choice| | 215 | question.choices.each do |choice| |
216 | choice.reload | 216 | choice.reload |
217 | - choice.prompts_on_the_left | ||
218 | - choice.prompts_on_the_right | ||
219 | Choice.update_counters choice.id, | 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 | end | 220 | end |
223 | end | 221 | end |
224 | end | 222 | end |