This project is archived and is in readonly mode.

#1666 ✓resolved
Josh

date select within fields for with index

Reported by Josh | December 29th, 2008 @ 09:41 PM | in 2.x

date_selects within fields_for don't add the index:

fields_for "user", :index => 1 do |ff|

ff.date_select :dob

end

renders as:

select id="user_dob_1i" name="user[dob(1i)]"

instead of:

select id="user_1_dob_1i" name="user[1][dob(1i)]"

This is my first attempt at a patch

Based on:

http://rails.lighthouseapp.com/p...

for some reason, it adds an index:

select name="post[456][updated_at(1i)]" id="post_456_updated_at_1i" index="456"

I guess that should be fixed?

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

Referenced by

Pages