class SimpleForm::Inputs::Select2Input

Private Instance Methods

input_html_options() click to toggle source
Calls superclass method
# File lib/simple_form/inputs/select2_input.rb, line 6
def input_html_options
  html_options = {}
  html_options[:data] = {
    theme: options[:theme],
    source: options[:source],
    attribute: options[:attribute],
    identifier: options[:identifier],
    placeholder: options[:placeholder]
  }
  html_options[:multiple] = true if options[:multiple]

  super.deep_merge(
    html_options
  )
end