class FormtasticBootstrap::Inputs::CheckBoxesInput
Public Instance Methods
choice_html(choice)
click to toggle source
# File lib/formtastic-bootstrap/inputs/check_boxes_input.rb, line 19 def choice_html(choice) template.content_tag(:label, hidden_fields? ? check_box_with_hidden_input(choice) : check_box_without_hidden_input(choice) << choice_label(choice), label_html_options.merge(:for => choice_input_dom_id(choice)).merge(choice_wrapping_html_options(choice)) ) end
choice_wrapping_html_options(choice)
click to toggle source
Calls superclass method
# File lib/formtastic-bootstrap/inputs/check_boxes_input.rb, line 29 def choice_wrapping_html_options(choice) new_class = [super[:class], 'checkbox'].join(' ') super.merge(:class => new_class) end
to_html()
click to toggle source
# File lib/formtastic-bootstrap/inputs/check_boxes_input.rb, line 7 def to_html control_group_div_wrapping do legend_html << hidden_field_for_all << input_div_wrapping do collection.map { |choice| choice_html(choice) }.join("\n").html_safe end end end