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

You must be a member of this account.

This project is archived and is in readonly mode.

date_select helper separator functionality bug

#5816

It appears if you use the date_select helper and you make the year your last select using the :order param, then you won't get a separator before that year select. For example, I did the following in my view:

date_select("post", "written_on", :order => [:day, :month, :year], :date_separator => '/')

and I ended up with:

[Month] / [Day] [Year]

Notice there is no separator before the year.

It appears the code for the date helper never returns a separator for the year select. Is this intended behavior or a bug? I would have expected to see a separator.

Reported by lee (at leemuro) · October 15th, 2010 @ 02:21 PM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Aditya Sanghi
    Aditya Sanghi
    • State changed from new to incomplete
    • Milestone set to 3.x
    • Assigned user set to José Valim
    • Importance changed from to Low

    Confirm that this is indeed a problem. Added failing test.

    The problem is only seen when separator is used in conjunction with order option.

    Still needs a patch though. upcoming.

    October 15th, 2010 @ 06:16 PM

  2. Aditya Sanghi
    Aditya Sanghi
    • State changed from incomplete to open
    • Tag changed from actionview, date_helper to actionview, date_helper, patch

    ..and including patch to fix the issue.

    October 15th, 2010 @ 06:58 PM

  3. Aditya Sanghi
    Aditya Sanghi
    • Milestone changed from 3.x to 3.0.2

    October 20th, 2010 @ 09:29 AM

  4. Aditya Sanghi
    Aditya Sanghi

    Bump for attention. Does this look fine? Changes? Please acknowledge :)

    November 1st, 2010 @ 10:37 AM

  5. lee (at leemuro)
    lee (at leemuro)

    This looks good to me. Fixes the issue.

    November 3rd, 2010 @ 02:43 AM

  6. Aditya Sanghi
    Aditya Sanghi
    • State changed from open to verified

    November 5th, 2010 @ 07:10 AM

  7. Santiago Pastorino
    Santiago Pastorino

    Please can you merge that in one patch and add the [#ticket_number state:stuff]

    November 11th, 2010 @ 03:15 AM

  8. Aditya Sanghi
    Aditya Sanghi

    Merged patch, and updated commit message.

    November 11th, 2010 @ 05:13 AM

  9. Repository
    Repository
    • State changed from verified to resolved

    November 11th, 2010 @ 02:30 PM

  10. Repository