Ruby 1.8.7, Rails 2.3.10.
I have an Observer set to watch :roles and :ads. I've declared it in my environment.rb Within that, I have the following methods (just testing right now):
class ApproveObserver < ActiveRecord::Observer observe :role, :ad def after_create(record) Rails.logger.info( record.inspect ) end def after_update(record) Rails.logger.info( record.inspect ) end def before_destroy(record) Rails.logger.info( record.inspect ) end end
Both create and update are working fine, but destroy -- whether I try before or after -- doesn't fire off anything. Is that to do with the fact that I'm looking at a destroyed object after the fact, or is there something else going on here?
Thanks in advance,
Walter