app/models/page.rb in locomotive_cms-0.0.4.beta12 vs app/models/page.rb in locomotive_cms-0.0.4
- old
+ new
@@ -38,11 +38,9 @@
## named scopes ##
scope :latest_updated, :order_by => [[:updated_at, :desc]], :limit => Locomotive.config.lastest_items_nb
scope :index, :where => { :slug => 'index', :depth => 0 }
scope :not_found, :where => { :slug => '404', :depth => 0 }
scope :published, :where => { :published => true }
- scope :fullpath, lambda { |fullpath| { :where => { :fullpath => fullpath } } }
- scope :minimal_attributes, :only => %w(title slug fullpath position depth published templatized parent_id created_at updated_at)
## methods ##
def index?
self.slug == 'index' && self.depth.to_i == 0