From 68bc4c18741a6a6c5dfe74af364fca795c0d79a6 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 16 Oct 2012 14:17:12 +0800 Subject: [PATCH] Fix page_part creation when design is changed --- app/models/page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/page.rb b/app/models/page.rb index 32a205f7..bee0700b 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -29,7 +29,7 @@ class Page < Item protected def create_parts - if self.new_record? || self.design.changed? + if self.new_record? || self.design_id_changed? page_design = self.design parent = self.parent menu_part = parent.page_parts.detect{|page_part| page_part.kind.eql?('public_r_tag') && page_part.public_r_tag.eql?('sub_menu') && page_part.public_r_tag_object_id.eql?(parent.id.to_s)} if parent