views:

12

answers:

0

I am trying to figure out an odd issue I am seeing where a reload! in console appears to solve an issue.

I have an AccountObserver class that should run an after_create method whenever a new Account instance is created. The after_create method creates a Resque job.

When I first load console, create a new Account instance results in 0 Resque jobs. I then do "reload!" and everything starts to work fine -- Resque jobs are successfully created with each new Account instance.

Any ideas what is causing this? What exactly does reload! do that could be modifying this behavior. To my knowledge, it just reloads all classes. But those classes should have been loaded on startup.