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.

This project is archived and is in readonly mode.

Some issues with separators in ActionView::Helpers::DateHelper

#460

First issue

:date_separator does not work in select_date. Mainly because it is not used when iterating over all elements of the date.

My little solution would be changing

options[:order].each do |o|
  select_date << self.send("select_#{o}", date, options)
end

to

separator = ''
options[:order].each do |o|
  select_date << separator + self.send("select_#{o}", date, options)
  separator = options[:date_separator] || ''
end

So, separator is '' for the first date element, and :date_separator for the next elements.

Second issue

The documentation for the usage of :date_separator is incorrectly placed in the comment block for select_datetime and not select_date.

Third issue

There is no documentation for :datetime_separator in select_datetime.

PS: I hope the formatting of this ticket is correct. A preview function would be great. :/

Reported by squirrel · June 20th, 2008 @ 06:05 PM

State: resolved
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. fluxin
  2. fluxin
    fluxin
    • Tag set to actionpack, helper, tiny

    here's a patch along with tests

    June 26th, 2008 @ 07:24 PM

  3. josh
    josh
    • Assigned user set to josh
    • State changed from new to open
    • Milestone cleared.

    August 7th, 2008 @ 06:48 AM

  4. josh
    josh
    • State changed from open to resolved

    August 7th, 2008 @ 04:50 PM