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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
58c538d6f6e8fbf54779c5607e567bff?d=identicon&s=25 John Joseph Bachir (Guest)
on 2007-04-10 19:46
(Received via mailing list)
I have group memberships modeled in a HMT relationship. My problem is,
when
a member is removed from a group, the relationship is not deleted, but
the
userid is merely set to 0.

http://pastie.caboo.se/52837

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

http://pastie.caboo.se/52842

Is this possible with HTM? Sure, I could have the relationship destroyed
if
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?

Thanks!

--
John Joseph Bachir
http://lyceum.ibiblio.org
http://blog.johnjosephbachir.org
aim/yim/msn/jabber.org/gtalk: johnjosephbachir
713-494-2704
http://jjb.cc
This topic is locked and can not be replied to.