engine/app/models/locomotive/editable_short_text.rb
2012-01-25 22:07:10 +01:00

21 lines
438 B
Ruby

module Locomotive
class EditableShortText < EditableElement
## fields ##
field :content, :localize => true
## methods ##
def content_with_localization
value = self.content_without_localization
value.blank? ? self.default_content : value
end
alias_method_chain :content, :localization
def as_json(options = {})
Locomotive::EditableShortTextPresenter.new(self).as_json
end
end
end