Class: Formtastic::Inputs::Select2Input

Inherits:
SelectInput
  • Object
show all
Extended by:
ActiveSupport::Autoload
Defined in:
lib/formtastic/inputs/select2_input.rb

Instance Method Summary collapse

Instance Method Details

#input_html_optionsObject



4
5
6
7
8
9
10
# File 'lib/formtastic/inputs/select2_input.rb', line 4

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