module Adminterface::Extensions::Inputs::BooleanInput
Public Instance Methods
input_html_options()
click to toggle source
Calls superclass method
# File lib/adminterface/extensions/inputs/boolean_input.rb, line 17 def input_html_options opts = options[:input_html] || {} super.merge(class: "form-check-input #{opts[:class]}".squish) end
label_html_options()
click to toggle source
Calls superclass method
# File lib/adminterface/extensions/inputs/boolean_input.rb, line 22 def label_html_options super.merge(class: "form-check-label") end
to_html()
click to toggle source
# 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
Private Instance Methods
boolean_wrapper_class()
click to toggle source
# File lib/adminterface/extensions/inputs/boolean_input.rb, line 28 def boolean_wrapper_class "form-check" end