Forum: Ruby on Rails has-many-through relationship - deleting DB rows

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.
John Joseph B. (Guest)
on 2007-04-10 21:46
(Received via mailing list)
I have group memberships modeled in a HMT relationship. My problem is,
a member is removed from a group, the relationship is not deleted, but
userid is merely set to 0.

Which makes me realize that I haven't declared :dependent => :destroy in
of my relationships:

Is this possible with HTM? Sure, I could have the relationship destroyed
either of the two objects are destroyed. But what I also need is for the
relationship to be destroyed if either of the object leave it. There
must be
a common solution for this?


John Joseph B.
aim/yim/msn/ johnjosephbachir
This topic is locked and can not be replied to.