I don''t know if there''s a Rails way but you may want to check
out
Class.inherited (ruby core api)
On 11/20/05, Kian Wright
<kianwright-6ac+KCm/u9AAvxtiuMwx3w@public.gmane.org>
wrote:> 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?
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>