class FormtasticBootstrap::Inputs::BooleanInput

Public Instance Methods

empty_label() click to toggle source

Need this for formatting to work.

# File lib/formtastic-bootstrap/inputs/boolean_input.rb, line 23
def empty_label
  template.content_tag(:label, '', :class => 'control-label') do end
end
label_html_options() click to toggle source
Calls superclass method
# File lib/formtastic-bootstrap/inputs/boolean_input.rb, line 17
def label_html_options
  new_class = [super[:class], "checkbox"].compact.join(" ")
  super.merge(:class => new_class)
end
to_html() click to toggle source
# File lib/formtastic-bootstrap/inputs/boolean_input.rb, line 7
def to_html
  control_group_div_wrapping do
    empty_label <<
    hidden_field_html <<
    input_div_wrapping(:block) do
      label_with_nested_checkbox
    end
  end
end