summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/page.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/page.rb b/app/models/page.rb
index 45a05dc..0bebb84 100644
--- a/app/models/page.rb
+++ b/app/models/page.rb
@@ -5,6 +5,14 @@ class Page < ActiveRecord::Base
5 PUBLIC_TEMPLATE_PATH = File.join(%w(custom page_templates public)) 5 PUBLIC_TEMPLATE_PATH = File.join(%w(custom page_templates public))
6 FULL_PUBLIC_TEMPLATE_PATH = File.join(RAILS_ROOT, 'app', 'views', PUBLIC_TEMPLATE_PATH) 6 FULL_PUBLIC_TEMPLATE_PATH = File.join(RAILS_ROOT, 'app', 'views', PUBLIC_TEMPLATE_PATH)
7 7
8 # named scopes
9
10 named_scope(
11 :drafts,
12 :include => [:node, :user, :globalize_translations],
13 :conditions => ["nodes.draft_id = pages.id"]
14 )
15
8 # Mixins and Plugins 16 # Mixins and Plugins
9 acts_as_taggable 17 acts_as_taggable
10 acts_as_list :column => :revision, :scope => :node_id 18 acts_as_list :column => :revision, :scope => :node_id