On 5/9/06, Francois Beausoleil <[EMAIL PROTECTED]> wrote:
Hi all !
I am adding observers to some model objects. One of these uses
RailsCron. RailsCron adds a class method to ActiveRecord::Base.
Unfortunately, during the initialization phase, plugins aren't yet
loaded, so I can't setup my observers in config/environment.rb, as
suggested by the comments.
What's a poor dev to do ?
At the moment, I have fallen back to this:
# Require all models, to speed things up in production and to setup
# all RailsCron tasks, observers.
Dir['app/models/**/*.rb'].each do |f|
require File.basename(f)
end
Thanks !
Not sure if rails-core is the best list to discuss this... Anyhow,
I'll take a look at the code and see if I see the problem.
--
Kyle Maxwell
Chief Technologist
E Factor Media // FN Interactive
[EMAIL PROTECTED]
1-866-263-3261
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core