public Method

InstanceTag.to_label_tag(text = nil, options = {})

There's no documentation for this item.

Source Code

# File action_view/helpers/form_helper.rb, line 468
def to_label_tag(text = nil, options = {})
  name_and_id = options.dup
  add_default_name_and_id(name_and_id)
  options["for"] = name_and_id["id"]
  content = (text.blank? ? nil : text.to_s) || method_name.humanize
  content_tag("label", content, options)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.