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.

date select within fields for with index

#1666

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?

Reported by Josh · December 29th, 2008 @ 09:41 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Josh
  2. Repository
    Repository
    • State changed from new to resolved

    (from [72608521871f73d6b07afa5f6f36e0dedcf1d079]) Fix date_select within fields_for with an index [#1666 date select within fields for with index state:resolved] [Josh, Frederick Cheung]

    Signed-off-by: Frederick Cheung frederick.cheung@gmail.com http://github.com/rails/rails/co...

    January 16th, 2009 @ 05:40 PM