Displaying 1 result from an estimated 1 matches for "display_ad_observ".
Did you mean:
display_ad_observer
2006 Feb 19
0
newbe: observer setup
...estions/references to debugging.
Dave
The two models:
display_ad.rd
require ''observer''
class DisplayAd < ActiveRecord::Base
include Observable
has_many :activities
#def after_update
# puts "*************Updated display ad*************"
#end
end
display_ad_observer.rd
class DisplayAdObserver < ActiveRecord::Observer
observe DisplayAd
def after_save(display_ad)
an_display_ad.logger.info( "Added display ad: #{an_display_ad.id}")
puts "*************Saved display ad*************"
end
def after_update(display_ad)...