Sha256: 92527c9d7cc46a6e796e4937605ac315ca3f8211a7e88ed8e7b312ee0c323587

Contents?: true

Size: 905 Bytes

Versions: 17

Compression:

Stored size: 905 Bytes

Contents

class Ecm::Cms::Folder < ActiveRecord::Base
  self.table_name = 'ecm_cms_folders'
  
  # associations
  has_many :ecm_cms_pages,
           :class_name => 'Ecm::Cms::Page',
           :dependent => :destroy,
           :foreign_key => 'ecm_cms_folder_id'
  has_many :ecm_cms_partials,
           :class_name => 'Ecm::Cms::Partial',
           :dependent => :destroy,
           :foreign_key => 'ecm_cms_folder_id'
  has_many :ecm_cms_templates,
           :class_name => 'Ecm::Cms::Template',
           :dependent => :destroy,
           :foreign_key => 'ecm_cms_folder_id'

  # attributes
  attr_accessible :basename,
                  :children_count,
                  :depth,
                  :ecm_cms_templates_count,
                  :lft,
                  :pathname,
                  :rgt

  # validations
  validates :basename, :presence => true
  validates :pathname, :presence => true
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ecm_cms-1.0.5.pre app/models/ecm/cms/folder.rb
ecm_cms-1.0.4.pre app/models/ecm/cms/folder.rb
ecm_cms-1.0.3.pre app/models/ecm/cms/folder.rb
ecm_cms-1.0.2.pre app/models/ecm/cms/folder.rb
ecm_cms-1.0.1.pre app/models/ecm/cms/folder.rb
ecm_cms-1.0.0.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.13.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.11.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.10.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.8.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.7.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.6.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.5.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.4.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.3.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.2.pre app/models/ecm/cms/folder.rb
ecm_cms-0.0.1.pre app/models/ecm/cms/folder.rb