Sha256: 373e862c238284eef9ad0cff9f7adf63d1538e01e76b0cb329ad1439ed9b9bef

Contents?: true

Size: 506 Bytes

Versions: 18

Compression:

Stored size: 506 Bytes

Contents

class AdminEnumInput < SimpleForm::Inputs::CollectionSelectInput
  def input(wrapper_options)
    super
    input_html_options[:class] << ' carnival-select'

    @builder.collection_select(
      attribute_name, @builder.object.class.const_get(attribute_name.to_s.upcase),
      :first, :last,
      {prompt: I18n.t("#{@builder.object.class.to_s.gsub(/^.*::/, '').downcase}.lista_#{attribute_name}.selecione",
                default: I18n.t("messages.select"))},
      input_html_options
    )
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
carnival-0.3.2 app/inputs/admin_enum_input.rb
carnival-0.3.1 app/inputs/admin_enum_input.rb
carnival-0.3.0 app/inputs/admin_enum_input.rb
carnival-0.2.8 app/inputs/admin_enum_input.rb
carnival-0.2.7 app/inputs/admin_enum_input.rb
carnival-0.2.6 app/inputs/admin_enum_input.rb
carnival-0.2.5 app/inputs/admin_enum_input.rb
carnival-0.2.4 app/inputs/admin_enum_input.rb
carnival-0.2.3 app/inputs/admin_enum_input.rb
carnival-0.1.10 app/inputs/admin_enum_input.rb
carnival-0.2.2 app/inputs/admin_enum_input.rb
carnival-0.2.1 app/inputs/admin_enum_input.rb
carnival-0.2.0 app/inputs/admin_enum_input.rb
carnival-0.1.9 app/inputs/admin_enum_input.rb
carnival-0.1.8 app/inputs/admin_enum_input.rb
carnival-0.1.7 app/inputs/admin_enum_input.rb
carnival-0.1.6 app/inputs/admin_enum_input.rb
carnival-0.1.5 app/inputs/admin_enum_input.rb