Forum: Ruby on Rails ActiveRecord::Base.class_eval not being called

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.
588fb9410bae0ee26b7b401d7b55eff5?d=identicon&s=25 Ben Lieber (lieberb)
on 2009-01-26 19:04
I am extending activerecord to write some audit data before each save or
create using this in the environment.rb file:

ActiveRecord::Base.class_eval do
blah
blah
blah
end

It was working the first day I did this, and now it has stopped. I tried
backing out of any changes that could have been made in the mean-time,
but to no avail.

if I put a logger.debug in the method, I see that it gets hit each time
the ap is started, but never after.

Any ideas why activerecord is not seeing this extension?

Thanks

-Ben
This topic is locked and can not be replied to.