Hi,
Let''s say I have two models: User and Location. A User can have several
locations.
(has_many, and belongs_to). I have the user edit form with user fields,
but also a table containing his locations. With some link_to_remote and
a rjs, we can add new locations ''inline''. Each location field
has some
input(''location[]'', ...) format.
When saving user, it doesn''t create also associated assocations, and I
do not know why. He does not even validate locations.
Hash is something like that: {"commit"=>"Save",
"action"=>"edit",
"id"=>"5",
"location"=>{"address"=>"foo"}}
What''s the problem here?
- model assocations definition?
- parameters hash?
Thank you for your help,
JE
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---