On 18.1.2007, at 12.04, Andrew Kaspick wrote:


I thought rails needed a label helper at first, but then I decided
that form builders fill the gap just fine as well as allowing more
flexibility and control.

I have my own form builder for example that automatically associates
labels with my controls without me needing to specify them in my view,
so this also cuts down on the code I need to write in my view.

I figure not having a label helper in rails forces people to do things
like use a form builder, which I think is the better approach.  It's
sorta like how using form_tag in rails 1.2 can only be closed by using
the '</form>' html tag.  It makes people think it doesn't feel right,
which is why you use should use form_for instead.

I personally say no to a label_helper in rails. :)

Andrew,

label_for is not meant to compete with custom form builders, it's meant to complement them and be a building block for them and at the same time be really useful for cases where you don't want to use a full-blown builder. I would say anything that fosters the use of label tags in Rails apps (*cough*, Basecamp login, *cough*) is worthwhile.

//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