Commit eb7cee48f804073d105ea682ac8706ba96bbf6d6

Authored by Dhruv Kapadia
1 parent 387cad08

Eager loading items for choice index

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/controllers/choices_controller.rb
... ... @@ -23,7 +23,7 @@ class ChoicesController < InheritedResources::Base
23 23 unless params[:include_inactive]
24 24 @choices = @question.choices(true).active.find(:all, :include => :item)
25 25 else
26   - @choices = @question.choices(true)
  26 + @choices = @question.choices.find(:all, :include =>:item)
27 27 end
28 28 end
29 29 index! do |format|
... ...