From 4efdb2078e9d16b3ed969c54ce7058ade2740278 Mon Sep 17 00:00:00 2001 From: Dhruv Kapadia Date: Fri, 16 Apr 2010 13:00:18 -0400 Subject: [PATCH] Choice creation vs appearance graph only examines active ideas --- app/controllers/questions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/questions_controller.rb b/app/controllers/questions_controller.rb index 7925a5f..de809dc 100644 --- a/app/controllers/questions_controller.rb +++ b/app/controllers/questions_controller.rb @@ -254,7 +254,7 @@ class QuestionsController < InheritedResources::Base elsif object_type == 'appearances_by_creation_date' hash = Hash.new() - @question.choices.find(:all, :order => :created_at).each do |c| + @question.choices.active.find(:all, :order => :created_at).each do |c| relevant_prompts = c.prompts_on_the_left.find(:all, :select => 'id') + c.prompts_on_the_right.find(:all, :select => 'id') appearances = Appearance.count(:conditions => {:prompt_id => relevant_prompts, :question_id => @question.id}) -- libgit2 0.21.2