This project is archived and is in readonly mode.
Allow custom month ordering for select_month
-
Yaroslav Markin
I believe you should use a custom selector for that scenario, no? select_month part of datetime is already a bit too bloated.
-
Andrew Kaspick
I've already had a need for this in 2 projects of mine, so I figure it may be useful for others and it's a pretty minor change. select_month doesn't seem overly bloated to me. (1..12) in the method is hard coded, so this just allows you to override that.
-
Michael Koziarski
- State changed from new to wontfix
I agree with yaroslav here. There's already a tonne of options to those helpers, and we'll never be able to satisfy everyone.
-
Andrew Kaspick
Fair enough, although...
Less requests for custom options may occur if some of those month name related methods (the ones that give you "January","Jan",etc.) were more accessible for reuse, but right now they're all private and depend on the class var for the @options.
I don't like copy and pasting rails methods that are more than a handful of lines long in order to customize them slightly as you then need to maintain them with each rails release. Using the existing select_month method gave me the month naming functionality "out of the box" which was a big benefit.
On the path towards Rail 3, moving the month name methods to a more accessible spot for the "public" plugin/gem API may be something to consider.
Thanks for reviewing anyway.
