method
label_tag
v2.3.8 -
Show latest stable
-
3 notes -
Class: ActionView::Helpers::FormTagHelper
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0
- 2.0.1
- 2.0.3 (0)
- 2.1.0 (0)
- 2.2.1 (3)
- 2.3.2 (0)
- 2.3.8 (0)
- 3.0.0 (27)
- 3.0.5 (0)
- 3.0.7 (0)
- 3.0.9 (-38)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
label_tag(name, text = nil, options = {})
public
Creates a label field
Options
- Creates standard HTML attributes for the tag.
Examples
label_tag 'name' # => <label for="name">Name</label> label_tag 'name', 'Your name' # => <label for="name">Your Name</label> label_tag 'name', nil, :class => 'small_label' # => <label for="name" class="small_label">Name</label>
Register or
log in
to add new notes.
grosser -
September 18, 2008
grosser -
September 17, 2008
bansalakhil -
January 9, 2009 - (v2.2.1)
1 thank
unobstrusive label tag
just use
label_tag('a_a','a_a')
and it works, just not ment for pure decorative labels :)
0 thanks
removes underscores -> do not use for images etc
example
#does not work label_tag('aa'+image_tag('x_x.gif'))
0 thanks


