Sha256: d245d38612a183f9838f855efc314a6a2696b1c04a24985e0976e25e8f945abc

Contents?: true

Size: 377 Bytes

Versions: 33

Compression:

Stored size: 377 Bytes

Contents

module Locomotive
  class EditableControlPresenter < EditableElementPresenter

    ## properties ##

    property :content
    property :options, :only_getter => true

    ## other getters / setters ##

    def options
      self.__source.options.map do |option|
        option['selected'] = option['value'] == self.__source.content
        option
      end
    end

  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
locomotive_cms-2.2.3 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.2.2 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.2.1 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.2.0 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.1.4 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.1.3 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.1.2 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.1.1 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.1.0 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.3 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.2 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.1 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.0 app/presenters/locomotive/editable_control_presenter.rb