This project is archived and is in readonly mode.

#2165 ✓resolved
Joshaven Potter

support of html Attributes for options_for_select

Reported by Joshaven Potter | March 7th, 2009 @ 07:15 PM | in 3.x

Regarding: ActionView::Helpers::FormOptionsHelper options_for_select

The options_for_select FormOptionsHelper method could easily support html attributes, however it currently ignores them. I recommend supporting html attributes when calling the function with an Array containing name, value & hash of attributes.

I used the attached modification to support this feature... they are not designed to be run by themselves but to be added to form_options_helper.rb

The attached file also contains new tests to ensure proper operation of the method.

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>

Referenced by

Pages