Class: EffectiveStaticControlInput

Inherits:
SimpleForm::Inputs::StringInput
  • Object
show all
Defined in:
app/models/inputs/effective_static_control_input.rb

Instance Method Summary collapse

Instance Method Details

#input(wrapper_options = nil) ⇒ Object



7
8
9
10
11
12
13
# File 'app/models/inputs/effective_static_control_input.rb', line 7

def input(wrapper_options = nil)
  options = merge_wrapper_options(input_html_options, wrapper_options) || {}
  options.merge!(input_options.select { |k, _| EffectiveFormInputs::REJECTED_INPUT_JS_OPTIONS.include?(k) })
  options['data-input-js-options'] = input_options.reject { |k, _| EffectiveFormInputs::REJECTED_INPUT_JS_OPTIONS.include?(k) }

  Inputs::EffectiveStaticControl::Input.new(object, object_name, template, attribute_name, options).to_html
end