class SimpleForm::Inputs::SwitchInput
Public Instance Methods
input(_wrapper_options = nil)
click to toggle source
# File lib/mtl/simple_form/switch_input.rb, line 9 def input(_wrapper_options = nil) template.content_tag(:div, class: :switch) do build_hidden_field_for_checkbox + template.label_tag(nil) do build_check_box_without_hidden_field(input_html_options) + template.content_tag(:span, nil, class: :lever) + label_text end end end
label(_wrapper_options = nil)
click to toggle source
# File lib/mtl/simple_form/switch_input.rb, line 24 def label(_wrapper_options = nil) '' end
label_input(wrapper_options = nil)
click to toggle source
# File lib/mtl/simple_form/switch_input.rb, line 20 def label_input(wrapper_options = nil) input(wrapper_options) end