Skip to content
tanema edited this page Mar 18, 2012 · 1 revision

label_for(name[[value,] html_options])

Creates a label for tag if no value is given then an attempt to labelize the name will be done. In most Cases this could be fine

label_for("user_id")
 
 => 
 
<label for='user_id' >User</label>

label_for("user_id", "id")
 
 => 
 
<label for='user_id' >id</label>
Clone this wiki locally