Sha256: 6034dede8bef58c22c9613b934b166df84b8ca9756636876aa57bbde15e63c3e

Contents?: true

Size: 465 Bytes

Versions: 2

Compression:

Stored size: 465 Bytes

Contents

class EnumInput < SimpleForm::Inputs::CollectionSelectInput
  def input(wrapper_options = nil)
    collection = options[:enum]
    label_method = :last
    value_method = :first
    merged_input_options = merge_wrapper_options(input_html_options,
                                                 wrapper_options)
    @builder.collection_select(
      attribute_name, collection, value_method, label_method,
      input_options, merged_input_options
    )
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
app_kit-0.0.2 lib/app_kit/inputs/enum_input.rb
app_kit-0.0.1 lib/app_kit/inputs/enum_input.rb