[Ruby] rails observers and class reloading
James Hillyerd
james at hillyerd.com
Sat May 19 21:16:49 PDT 2007
On 5/8/07, Aaron Patterson <aaron at tenderlovemaking.com> wrote:
>
> Hello! Has anyone had a problem (in rails) with observers not getting
> reloaded? Basically when I am running in development mode my models
> will get reloaded, but the observers don't! Since the observers aren't
> reloaded, they don't run.
Since nobody responded, I will say that I've been told observers are going
to be removed from Rails, but couldn't find docs backing that up. I spent
an evening experimenting with observers and found them completely unusable.
They seem to come into existence before my environment was totally setup, so
they (and the model they observe) didn't have access to my global
configuration stuff at boot time. Mongrel would just exit. I eventually
figured out how to add an observer outside of the rails initializer block,
but then they wouldn't autoreload, and seemed to prevent reloading of the
model they were observing also.
-james
--
James A. Hillyerd <james at hillyerd.com>
Chief Technical Officer - ActiveRain Corp
More information about the Ruby
mailing list