From 024ced8a3f6b4c4486866f25ff2875a103dfd882 Mon Sep 17 00:00:00 2001 From: Luke Baker Date: Thu, 1 Dec 2011 11:28:58 -0500 Subject: [PATCH] update cache updater to accurately update prompts --- lib/tasks/prune_db.rake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/tasks/prune_db.rake b/lib/tasks/prune_db.rake index fde12f7..db12935 100644 --- a/lib/tasks/prune_db.rake +++ b/lib/tasks/prune_db.rake @@ -214,11 +214,9 @@ namespace :prune_db do Question.all.each do |question| question.choices.each do |choice| choice.reload - choice.prompts_on_the_left - choice.prompts_on_the_right Choice.update_counters choice.id, - :prompts_on_the_left_count => choice.prompts_on_the_left.count, - :prompts_on_the_right_count => choice.prompts_on_the_right.count + :prompts_on_the_left_count => choice.prompts_on_the_left.count - choice.prompts_on_the_left_count, + :prompts_on_the_right_count => choice.prompts_on_the_right.count - choice.prompts_on_the_right_count end end end -- libgit2 0.21.2