On 18.1.2007, at 16.01, Erik Kastner wrote:


I agree - anything to encourage label's is great. Most browsers shift
focus to the "for" attribute on click. But even without that, a label
tag is semantically correct in describing a form element.

I submitted my first patch that add labels for the generated scaffold
source for resources:
http://dev.rubyonrails.org/ticket/7091

Great! And if these both patches were accepted, the code in your patch would be even leaner:

<label for="<%= singular_name %>_<%= attribute.name %>"><%= attribute.column.human_name %></label><br />

=>

<%= f.label_for(attribute.name, attribute.column.human_name) %><br />

//jarkko

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to