module FormtasticBootstrap::Inputs::Base::Labelling

Public Instance Methods

control_label_html_options() click to toggle source
# File lib/formtastic-bootstrap/inputs/base/labelling.rb, line 20
def control_label_html_options
  new_class = [label_html_options[:class], "control-label"].compact.join(" ")
  label_html_options.merge(:class => new_class)
end
label_html() click to toggle source
# File lib/formtastic-bootstrap/inputs/base/labelling.rb, line 8
def label_html
  render_label? ? builder.label(input_name, label_text, control_label_html_options) : "".html_safe
end
label_html_options() click to toggle source
# File lib/formtastic-bootstrap/inputs/base/labelling.rb, line 12
def label_html_options
  opts = {}
  opts[:for] ||= input_html_options[:id]
  opts[:class] = [opts[:class]]

  opts
end