This project is archived and is in readonly mode.

#460 ✓resolved
squirrel

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

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

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. :/

Comments and changes to this ticket

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

Pages