Sha256: b415a9702e9cc351f84396258cf5983477e9cbcbf05b80bd5a063b38ec707592

Contents?: true

Size: 438 Bytes

Versions: 2

Compression:

Stored size: 438 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc2 app/models/locomotive/editable_short_text.rb
locomotive_cms-2.0.0.rc1 app/models/locomotive/editable_short_text.rb