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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ben L. (Guest)
on 2009-01-26 20: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

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?


This topic is locked and can not be replied to.