class SimpleForm::FormBuilder

def label(attribute_name, *args)


f.label :name, :id => "cool_label"
f.label :name, :required => false

f.label :name, :label => "Name" # Same as above, but adds required tag
f.label :name, "Name" # Same behavior as Rails, do not add required tag
f.label :name # Do I18n lookup

== Examples

as :label_html.
through the :label option or using i18n. All the given options are sent
Creates a default label tag for the given attribute. You can give a label
def label(attribute_name, *args)
  return super if args.first.is_a?(String) || block_given?
  options = args.extract_options!.dup
  options[:label_html] = options.except(:label, :required)
  column      = find_attribute_column(attribute_name)
  input_type  = default_input_type(attribute_name, column, options)
  SimpleForm::Inputs::Base.new(self, attribute_name, column, input_type, options).label
end