Module: Adminterface::Extensions::Inputs::BooleanInput
- Includes:
- Base
- Included in:
- ActiveAdmin::Inputs::BooleanInput
- Defined in:
- lib/adminterface/extensions/inputs/boolean_input.rb
Instance Method Summary collapse
Methods included from Adminterface::Extensions::Inputs::Base::ActiveAdminConfig
#active_admin_config, #inputs_config
Methods included from Adminterface::Extensions::Inputs::Base::Pluginish
#plugin?, #plugins_configs, #plugins_options
Methods included from Adminterface::Extensions::Inputs::Base::Wrapping
#input_wrapping, #input_wrapping_html, #wrapper_classes
Instance Method Details
#input_html_options ⇒ Object
17 18 19 20 |
# File 'lib/adminterface/extensions/inputs/boolean_input.rb', line 17 def opts = [:input_html] || {} super.merge(class: "form-check-input #{opts[:class]}".squish) end |
#label_html_options ⇒ Object
22 23 24 |
# File 'lib/adminterface/extensions/inputs/boolean_input.rb', line 22 def super.merge(class: "form-check-label") end |
#to_html ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/adminterface/extensions/inputs/boolean_input.rb', line 7 def to_html input_wrapping do template.content_tag :div, class: boolean_wrapper_class do hidden_field_html + check_box_html + label_html end end end |