app/models/page.rb in beef-pages-0.1.1 vs app/models/page.rb in beef-pages-0.1.2
- old
+ new
@@ -1,9 +1,8 @@
class Page < ActiveRecord::Base
- # http://ramblings.gibberishcode.net/archives/one-activerecord-model-acting-as-a-list-and-tree
-
+ default_scope :order => 'position ASC'
named_scope :top, :conditions => {:parent_id => nil}, :order => :position
- named_scope :ordered, :order => 'position ASC'
+ # http://ramblings.gibberishcode.net/archives/one-activerecord-model-acting-as-a-list-and-tree
has_assets
acts_as_content_node
acts_as_tree
acts_as_list :scope => :parent_id
\ No newline at end of file