Forum: Ruby on Rails has_many :through troubles

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Paolo N. (Guest)
on 2006-06-09 23:20
(Received via mailing list)
Hi list

I have a question related to an has_many :through association.
Basicly I have a form that updates the entire has_many :through
collection AND the parent object.

from the form I have:

params[:parentobject]  (all the attributes related to the parent object)



an array of all the destination ID of the has many through association

How can I cleanly (and maybe atomicly since I'm using postgres)
destroy and create the needed records in the join table within the
update statement of the parent?


This topic is locked and can not be replied to.