This project is archived and is in readonly mode.

#48 ✓resolved
encoded

label tag ignoring for attribute

Reported by encoded | April 25th, 2008 @ 11:54 PM

When using the label method on a form builder, it seems useful to be able to manually set a for attribute. Currently the to_label_tag method will either override the for user-specified option, if it is specified as a string key, or it will put two for attributes in the generated html if the user supplies a symbol key.

I am including a patch that I believe fills this gap, along with a pair of tests.

This is my first patch submission, so if I've missing something, please instruct me for next time, thanks. :)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages