From ce140a7fc8eb6bea5a567e7c6681087db0055fb4 Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 28 Mar 2009 18:20:02 +0100 Subject: introducing named scope :drafts for Page --- app/controllers/admin_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/controllers/admin_controller.rb') 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 before_filter :login_required def index - @drafts = Page.find( - :all, - :include => [:node, :user, :globalize_translations], - :conditions => ["nodes.draft_id = pages.id"] - ) + @drafts = Page.drafts end end -- cgit v1.3