Sha256: 9a4715f4d657a11a2c70cee8c5aee5dd489a40559f8b6a7e4f4aefa0006fbc86

Contents?: true

Size: 296 Bytes

Versions: 6

Compression:

Stored size: 296 Bytes

Contents

class Page < ActiveRecord::Base
  has_many :attachments
  validates :title, :presence=>true
  belongs_to :parent, :class_name=>'Page', :foreign_key=>'parent_id'
  has_many :children, :class_name=>'Page', :foreign_key=>'parent_id'
  acts_as_taggable

  scope :orphans, where(:parent_id=>nil)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wheels-0.0.48 app/models/page.rb
wheels-0.0.47 app/models/page.rb
wheels-0.0.46 app/models/page.rb
wheels-0.0.45 app/models/page.rb
wheels-0.0.44 app/models/page.rb
wheels-0.0.43 app/models/page.rb