Sha256: 4f1f3cd32c5e17b106b77599faf217ca2337501fcba94f9c27bc0f9788fc79df

Contents?: true

Size: 446 Bytes

Versions: 25

Compression:

Stored size: 446 Bytes

Contents

class AdminEnumInput < SimpleForm::Inputs::CollectionSelectInput
  def input
    super
    @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: {:class=> 'chosen'}
    )
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
carnival-0.0.55 app/inputs/admin_enum_input.rb
carnival-0.0.54 app/inputs/admin_enum_input.rb
carnival-0.0.53 app/inputs/admin_enum_input.rb
carnival-0.0.52 app/inputs/admin_enum_input.rb
carnival-0.0.51 app/inputs/admin_enum_input.rb
carnival-0.0.50 app/inputs/admin_enum_input.rb
carnival-0.0.49 app/inputs/admin_enum_input.rb
carnival-0.0.48 app/inputs/admin_enum_input.rb
carnival-0.0.47 app/inputs/admin_enum_input.rb
carnival-0.0.45 app/inputs/admin_enum_input.rb
carnival-0.0.44 app/inputs/admin_enum_input.rb
carnival-0.0.43 app/inputs/admin_enum_input.rb
carnival-0.0.42 app/inputs/admin_enum_input.rb
carnival-0.0.41 app/inputs/admin_enum_input.rb
carnival-0.0.40 app/inputs/admin_enum_input.rb
carnival-0.0.39 app/inputs/admin_enum_input.rb
carnival-0.0.38 app/inputs/admin_enum_input.rb
carnival-0.0.37 app/inputs/admin_enum_input.rb
carnival-0.0.36 app/inputs/admin_enum_input.rb
carnival-0.0.35 app/inputs/admin_enum_input.rb