avoid updating child pages which have a default_attribute on change of a template they inherit from

This commit is contained in:
Dirk Kelly 2011-03-03 15:35:37 +08:00
parent 9aa68c4611
commit 2482567db3
1 changed files with 3 additions and 1 deletions

View File

@ -75,8 +75,10 @@ module Models
end
self.editable_elements.build(new_attributes, el.class)
else
elsif existing_el.default_attribute.nil?
existing_el.attributes = { :disabled => false, :default_content => el.content }
else
existing_el.attributes = { :disabled => false }
end
end
end