I noticed when I have a form up that reflects a parent and two types
of children that the names of the field use a global index of the
total number of available children. I expected it to be scoped per
child type.

For example, if I have post that has_many comments_type1 and many
comments_type2, the form would look something like this

<input type="text" name="post[comments_type1_attributes][0]" />
<input type="text" name="post[comments_type2_attributes][1]" />

Shouldn't the second input's name be post[comments_type2_attributes]
[0] ?

The code that does this is in actionpack-2.3.2/lib/action_view/helpers/
form_helper.rb on line 1028.

Thanks.


-Nash
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to