From 48e7a2e67b66281a239c98fc4c760aaf168b9f3a Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 6 May 2014 17:18:41 +0800 Subject: [PATCH] some changes for page model --- app/models/page.rb | 7 ++++--- built_in_extensions.rb | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/models/page.rb b/app/models/page.rb index 7384fb0..a1ac54b 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -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 diff --git a/built_in_extensions.rb b/built_in_extensions.rb index 64d7cf4..e7a9d6b 100644 --- a/built_in_extensions.rb +++ b/built_in_extensions.rb @@ -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' \ No newline at end of file +gem 'links', git: 'git@gitlab.tp.rulingcom.com:saurabh/links.git' +gem 'page_content', git: 'git@gitlab.tp.rulingcom.com:saurabh/pagecontent.git'