Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

This project is archived and is in readonly mode.

ActionView class method to set default order for date and time field helpers

#28

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.

Reported by Adam Meehan · April 21st, 2008 @ 08:28 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Adam Meehan
    Adam Meehan
    • 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

    April 24th, 2008 @ 06:08 AM

  2. Adam Meehan
    Adam Meehan
    • 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

    May 1st, 2008 @ 01:16 AM

  3. Adam Meehan
  4. DHH
    DHH
    • 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 ;)

    May 1st, 2008 @ 04:56 AM

  5. Adam Meehan
    Adam Meehan

    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.

    May 1st, 2008 @ 05:45 AM

  6. af001
    af001
    • Tag set to actionpack, patch
    • Importance changed from to

    私の中で、総合評価のとっても低いアバアバクロホリスタークロ銀座店。アバクロは大好きなんですけどね。一昨日の東京駅付近での打ち合わせの後、散歩がてら久々に行ってきました。そしたらビックリ!相変わらアバクロず、踊っているだけの店員さんとかもいましたが、

    May 5th, 2011 @ 02:56 AM