Sha256: eee7694a421ef082a16774ec10bda9e31719d3d43602ee7d4cf178a7b025ce70

Contents?: true

Size: 577 Bytes

Versions: 9

Compression:

Stored size: 577 Bytes

Contents

module Locomotive
  class EditableShortTextPresenter < EditableElementPresenter

    ## properties ##

    properties :content, :default_content

    ## callbacks ##

    set_callback :set_attributes, :after, :set_default_content

    ## other getters / setters ##

    def default_content=(value)
      @default_content = value
    end

    ## methods ##

    protected

    def set_default_content
      # if the default content was not explicitly set, set it to false
      self.__source.default_content = @default_content.nil? ? false : @default_content
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotive_cms-2.1.4 app/presenters/locomotive/editable_short_text_presenter.rb
locomotive_cms-2.1.3 app/presenters/locomotive/editable_short_text_presenter.rb
locomotive_cms-2.1.2 app/presenters/locomotive/editable_short_text_presenter.rb
locomotive_cms-2.1.1 app/presenters/locomotive/editable_short_text_presenter.rb
locomotive_cms-2.1.0 app/presenters/locomotive/editable_short_text_presenter.rb
locomotive_cms-2.0.3 app/presenters/locomotive/editable_short_text_presenter.rb
locomotive_cms-2.0.2 app/presenters/locomotive/editable_short_text_presenter.rb
locomotive_cms-2.0.1 app/presenters/locomotive/editable_short_text_presenter.rb
locomotive_cms-2.0.0 app/presenters/locomotive/editable_short_text_presenter.rb