From eb7cee48f804073d105ea682ac8706ba96bbf6d6 Mon Sep 17 00:00:00 2001 From: Dhruv Kapadia Date: Wed, 24 Mar 2010 18:01:33 -0400 Subject: [PATCH] Eager loading items for choice index --- app/controllers/choices_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/choices_controller.rb b/app/controllers/choices_controller.rb index 18b948f..3ca9003 100644 --- a/app/controllers/choices_controller.rb +++ b/app/controllers/choices_controller.rb @@ -23,7 +23,7 @@ class ChoicesController < InheritedResources::Base unless params[:include_inactive] @choices = @question.choices(true).active.find(:all, :include => :item) else - @choices = @question.choices(true) + @choices = @question.choices.find(:all, :include =>:item) end end index! do |format| -- libgit2 0.21.2