Module: FormtasticBootstrap::Inputs::Base::Choices
- Included in:
- CheckBoxesInput, RadioInput
- Defined in:
- lib/formtastic-bootstrap/inputs/base/choices.rb
Instance Method Summary collapse
- #choices_wrapping_html_options ⇒ Object
- #control_label_html_options ⇒ Object
- #input_div_wrapping(&block) ⇒ Object
-
#legend_html ⇒ Object
This is actually a label in Bootstrap.
Instance Method Details
#choices_wrapping_html_options ⇒ Object
12 13 14 15 |
# File 'lib/formtastic-bootstrap/inputs/base/choices.rb', line 12 def new_class = [super[:class], "controls"].compact.join(" ") super.merge(:class => new_class) end |
#control_label_html_options ⇒ Object
31 32 33 |
# File 'lib/formtastic-bootstrap/inputs/base/choices.rb', line 31 def super.merge(:for => nil) end |
#input_div_wrapping(&block) ⇒ Object
6 7 8 9 10 |
# File 'lib/formtastic-bootstrap/inputs/base/choices.rb', line 6 def input_div_wrapping(&block) template.content_tag(:div, ) do [yield, error_html(:block), hint_html(:block)].join("\n").html_safe end end |
#legend_html ⇒ Object
This is actually a label in Bootstrap.
25 26 27 28 29 |
# File 'lib/formtastic-bootstrap/inputs/base/choices.rb', line 25 def legend_html template.content_tag(:label, ) do render_label? ? label_text : "".html_safe end end |