diff options
| author | hukl <contact@smyck.org> | 2009-03-28 18:10:03 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-28 18:10:03 +0100 |
| commit | fa58bb035feba5988f259e3318d529e05db8187b (patch) | |
| tree | e3ab6555de529232de22275129343b848d4d8a02 /app | |
| parent | 2eec891c3c738eba46df41520d477322d8e6ea6b (diff) | |
using :include => :globalize_translations here to speed up the query time
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/admin_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 | |||
| 2 | before_filter :login_required | 2 | before_filter :login_required |
| 3 | 3 | ||
| 4 | def index | 4 | def index |
| 5 | @drafts = Page.find(:all, :include => [:node, :user], :conditions => ["nodes.draft_id = pages.id"]) | 5 | @drafts = Page.find( |
| 6 | :all, | ||
| 7 | :include => [:node, :user, :globalize_translations], | ||
| 8 | :conditions => ["nodes.draft_id = pages.id"] | ||
| 9 | ) | ||
| 6 | end | 10 | end |
| 7 | 11 | ||
| 8 | end | 12 | end |
