Sha256: 9f0827e5baa1970cff079966bc22c36345c583982a6a4b3d62e01683130f7b38

Contents?: true

Size: 421 Bytes

Versions: 1

Compression:

Stored size: 421 Bytes

Contents

class Formtastic::Inputs::Select2Input < Formtastic::Inputs::SelectInput
  extend ActiveSupport::Autoload

  def input_html_options
    input_options = super
    input_options[:class] = [input_options[:class], 'auto-static-select2'].compact.join(' ')
    input_options[:data] ||= {}
    input_options[:data][:placeholder] ||= (options[:placeholder] || localized_label || humanized_method_name)
    input_options
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
formtastic_auto_select2-0.0.5 lib/formtastic/inputs/select2_input.rb