This project is archived and is in readonly mode.

#2560 ✓wontfix
Bryan Larsen

select_datetime :order results in extra fields

Reported by Bryan Larsen | April 24th, 2009 @ 03:39 PM

To reproduce

$ rails -v
Rails 2.3.2
$ rails test1
$ cd test1
$ rake db:migrate
$ script/console
>> puts helper.select_datetime(Time.now, :prefix=>"foo", :order=> [:year, :month, :day, :hour, :minute, :second]).split("\n").find_all {|s| /select /.match(s)}
<select id="foo_year" name="foo[year]">
<select id="foo_month" name="foo[month]">
<select id="foo_day" name="foo[day]">
<select id="foo_hour" name="foo[hour]">
<select id="foo_minute" name="foo[minute]">
<select id="foo_second" name="foo[second]">
<select id="foo_hour" name="foo[hour]">
<select id="foo_minute" name="foo[minute]">

As you can see, foo_hour and foo_minute appear twice.

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>

Attachments

Pages