Forum: Ruby on Rails Observing HABTM-associations with observers

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.
B8873547e864c0f41eb0ccb0f8b18ecf?d=identicon&s=25 Timo Springmann (Guest)
on 2007-05-15 09:52
(Received via mailing list)
I'm trying to write an observer which tracks changes to my data. This
seems to
be an impossible for habtm-associations as all hooks in an observer just
works for models. As habtm-associatons gets saved when they're added to
a
collection I haven't found a way to get an observer called. What's a
good
solution to this problem?

I really wonder why there isn't a way of adding objects to a collection
without instantly creating an entry in the join table an just create
these
entry when the parent object is saved?

Regards,
Timo
This topic is locked and can not be replied to.