Class: SwitchInput
- Inherits:
-
SimpleForm::Inputs::BooleanInput
- Object
- SimpleForm::Inputs::BooleanInput
- SwitchInput
- Defined in:
- lib/simple_form_custom_inputs/simple_form/switch_input.rb
Instance Method Summary collapse
Instance Method Details
#input(wrapper_options) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/simple_form_custom_inputs/simple_form/switch_input.rb', line 2 def input() [:class] ||= {} [:class] << 'js-switch' [:data] ||= {} [:data].merge!({ color: "#12CA9E" }) unless [:data][:color] [:data].merge!({ size: "medium" }) unless [:data][:size] super end |