From fa58bb035feba5988f259e3318d529e05db8187b Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 28 Mar 2009 18:10:03 +0100 Subject: using :include => :globalize_translations here to speed up the query time --- app/controllers/admin_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 06c5390..81a3809 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -2,7 +2,11 @@ class AdminController < ApplicationController before_filter :login_required def index - @drafts = Page.find(:all, :include => [:node, :user], :conditions => ["nodes.draft_id = pages.id"]) + @drafts = Page.find( + :all, + :include => [:node, :user, :globalize_translations], + :conditions => ["nodes.draft_id = pages.id"] + ) end end -- cgit v1.3