Forum: Ruby on Rails Observing HABTM-associations with observers

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.
Timo S. (Guest)
on 2007-05-15 11: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
collection I haven't found a way to get an observer called. What's a
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
entry when the parent object is saved?

This topic is locked and can not be replied to.