Forum: Ruby on Rails Observe all models (easily)

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.
27f8beb57f4d56d328749b51ac886d2c?d=identicon&s=25 kianwright (Guest)
on 2005-11-21 01:00
(Received via mailing list)
Is there any easy way to have an observer class observe all models?

Right now, (for a logging observer) I'm just listing all my models for
the "observe" class method.
However, I'd like to guard against someone in the future adding a new
model, but forgetting to add
the new class to the observer. Any sugggestions?
Accad816054fc1b2fa7dae2a2fce5266?d=identicon&s=25 cuong.tran (Guest)
on 2005-11-21 01:04
(Received via mailing list)
I don't know if there's a Rails way but you may want to check out
Class.inherited (ruby core api)
This topic is locked and can not be replied to.