Sha256: 094bf83a2c9d63f89366efec46f38104e8a873f7aaafb41148f581b39a473aef

Contents?: true

Size: 355 Bytes

Versions: 9

Compression:

Stored size: 355 Bytes

Contents

module Locomotive
  class EditableControlPresenter < EditableElementPresenter

    delegate :content, :to => :source

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

    def included_methods
      super + %w(content options)
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc12 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.0.rc11 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.0.rc10 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.0.rc9 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.0.rc8 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.0.rc7 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.0.rc6 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.0.rc5 app/presenters/locomotive/editable_control_presenter.rb
locomotive_cms-2.0.0.rc4 app/presenters/locomotive/editable_control_presenter.rb