Module: FormtasticBootstrap::Inputs::Base::Labelling
- Includes:
- Formtastic::Inputs::Base::Labelling
- Included in:
- FormtasticBootstrap::Inputs::Base
- Defined in:
- lib/formtastic-bootstrap/inputs/base/labelling.rb
Instance Method Summary collapse
Instance Method Details
#control_label_html_options ⇒ Object
20 21 22 23 |
# File 'lib/formtastic-bootstrap/inputs/base/labelling.rb', line 20 def new_class = [[:class], "control-label"].compact.join(" ") .merge(:class => new_class) end |
#label_html ⇒ Object
8 9 10 |
# File 'lib/formtastic-bootstrap/inputs/base/labelling.rb', line 8 def label_html render_label? ? builder.label(input_name, label_text, ) : "".html_safe end |
#label_html_options ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/formtastic-bootstrap/inputs/base/labelling.rb', line 12 def opts = {} opts[:for] ||= [:id] opts[:class] = [opts[:class]] opts end |