This project is archived and is in readonly mode.
ActionView class method to set default order for date and time field helpers
Reported by Adam Meehan | April 21st, 2008 @ 08:28 AM
If you need to explicitly set the date order when using the date and time field helpers, then it is likely you will need to do it everywhere in your app.
This patch adds the class accessor default_date_select_order to ActionView::Base which allows the order to be set once in an initializer file to keep things nice and DRY.
Comments and changes to this ticket
-
Adam Meehan April 24th, 2008 @ 06:08 AM
- Title changed from Default order for date and time field helpers to Add class method to set default order for date and time field helpers
-
Adam Meehan May 1st, 2008 @ 01:16 AM
- Title changed from Add class method to set default order for date and time field helpers to ActionView class method to set default order for date and time field helpers
-
DHH May 1st, 2008 @ 04:56 AM
- State changed from new to invalid
I understand the sentiment to why you'd want this, but I don't like the floating, global accessor on AV to control it. I think if you're often using similar defaults in your application, you should probably just wrap the call in a app-specific method.
Thanks for taking the time to work on a ticket, though. Looks like you did a good job with tests and all. I'm sure the next one will make it in ;)
-
Adam Meehan May 1st, 2008 @ 05:45 AM
Understood. I usually do use a method wrapper or a full form builder class for form intensive apps. Just thought it made for a sensible default option.
Thanks for the encouraging words, you're gentleman.
-
af001 May 5th, 2011 @ 02:56 AM
- Tag set to actionpack, patch
- Importance changed from to
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
Tags
Referenced by
- 6720 Parameter Filter not working The second key (action_dispatch.request.parameters) has a...