Hi all, I thought I was trying to do something rather simple, but it has caused me a lot of headaches. Here it is:
- in my program: model_a has_many model_b. model_b has_many model_c. - in the user interface, I would like the user to be able to fill the information for one model_a, one or more associated model_bs (corresponding fields could be added with a set of links 'add/remove a model_b'), and for each model_b added, one or more model_c (with the same mechanism). Thanks to the great tutorial "Handle multiple models in one form", it's easy to handle the first step (any number of model_b per model_a), but I can't get the second step to work. The natural indexing should (I think) be: "model_a[model_b_attributes][][model_c_attributes][][an_attribute]" But it doesn't seem to work. I read here http://guides.rubyonrails.org/form_helpers.html that "only one level of “arrayness” is allowed" and that I should use hashes instead, but I am not quite sure I understand how to do it. Do you have any idea? Thanks a lot PJ --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

