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
locomotivecms-3.0.0.pre.alpha.3 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.7 app/presenters/locomotive/editable_control_presenter.rb
locomotivecms-3.0.0.pre.alpha.2 app/presenters/locomotive/editable_control_presenter.rb
locomotivecms-3.0.0.pre.alpha app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.6 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.6.rc2 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.6.rc1 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.5 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.4 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.3 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.2 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.1 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.0 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.0.rc3 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.0.rc2 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.5.0.rc1 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.4.1 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.4.0 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.3.1 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.3.0 app/presenters/locomotive/editable_control_presenter.rb