diff options
| author | hukl <contact@smyck.org> | 2009-03-28 18:20:02 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-28 18:20:02 +0100 |
| commit | ce140a7fc8eb6bea5a567e7c6681087db0055fb4 (patch) | |
| tree | b6460e87956cbd90523c09f860bcb631e0d85b84 /app/controllers | |
| parent | 1b149d03320bd08f0977201b5662343707e15975 (diff) | |
introducing named scope :drafts for Page
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/admin_controller.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 81a3809..d61de30 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb | |||
| @@ -2,11 +2,7 @@ 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( | 5 | @drafts = Page.drafts |
| 6 | :all, | ||
| 7 | :include => [:node, :user, :globalize_translations], | ||
| 8 | :conditions => ["nodes.draft_id = pages.id"] | ||
| 9 | ) | ||
| 10 | end | 6 | end |
| 11 | 7 | ||
| 12 | end | 8 | end |
