Your observer should have something like the following.
class ActivityObserver < ActiveRecord::Observer def after_update(activity) if activity.attribute_name_changed? puts "The above condition will return true or false, and this time it has returned true..!!!" end end end
The above method will work. I think you were looking for this.
Nishutosh sharma
source share