some changes for page model

This commit is contained in:
Harry Bomrah 2014-05-06 17:18:41 +08:00
parent c48ecd093e
commit 48e7a2e67b
2 changed files with 6 additions and 4 deletions

View File

@ -10,15 +10,16 @@ class Page
field :data_count, type: Integer, default: 10
field :enabled_for, type: Array, default: []
field :menu_enabled_for, type: Array, default: []
field :categories, type: Array, :default => []
field :enabled_for_sitemap, type: Array, :default => []
field :categories, type: Array, :default => []
field :enabled_for_sitemap, type: Array, :default => []
has_many :page_parts, :autosave => true, :dependent => :destroy
has_many :page_contexts, :autosave => true, :dependent => :destroy
has_many :child_page, :class_name => 'Page', :inverse_of => :parent_page, :dependent => :destroy
belongs_to :parent_page, :class_name => 'Page', :inverse_of => :child_page
def to_param
page_id.parameterize
end

View File

@ -1,4 +1,5 @@
gem 'announcement', git: 'git@gitlab.tp.rulingcom.com:saurabh/announcement-test.git'
gem 'ad_banner', git: 'git@gitlab.tp.rulingcom.com:saurabh/adbanner-test.git'
gem 'gallery', git: 'git@gitlab.tp.rulingcom.com:saurabh/gallery.git'
gem 'links', git: 'git@gitlab.tp.rulingcom.com:saurabh/links.git'
gem 'links', git: 'git@gitlab.tp.rulingcom.com:saurabh/links.git'
gem 'page_content', git: 'git@gitlab.tp.rulingcom.com:saurabh/pagecontent.git'