This project is archived and is in readonly mode.

#3807 ✓committed
Marc Schütz

[patch] DateHelpers ignore html_options

Reported by Marc Schütz | January 28th, 2010 @ 07:27 PM | in 2.3.6

select_time/select_date and friends don't add the html_options to the hidden fields they create (i.e. hour&minute for select_date, year,month&day for select_time), because they are not used by build_hidden().

Consider the case where you want to build a disabled time selector. Because the hidden fields are not disabled, they are submitted by the browser and end up in the controller's params. If you call update_attributes, it will assign the corresponding field a value.

Patch attached.

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