File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,18 @@ class EditableText < EditableElement
1414
1515 ## methods ##
1616
17+ # Change the content of the editable element if the value is a new version.
18+ # This method has been overridden for 2 reasons:
19+ # - we have to register the current locale (localized site)
20+ # - the default_content attribute has to be turned off
21+ #
22+ # Called by:
23+ # - the API: page with a YAML header defining the initial content for this editable element
24+ # - the UI: if the content is the same as the default one or the previous one, don't do anything.
1725 def content = ( value )
1826 return if value == self . content
1927 self . add_current_locale
20- self . default_content = false unless self . new_record?
28+ self . default_content = false
2129 super
2230 end
2331
You can’t perform that action at this time.
0 commit comments