It looks like Paperclip doesn't honor the ActiveRecord dirty model. How do I detect the change in after_save
callback.
class User
has_attachment :avatar
after_save :do_something
def do_something
if name_changed?
#
end
# How to determine avatar was changed?
#if avatar_changed?
# #
#end
end
end
Note
I know I can detect the change in before_save
callback using avatar.dirty?
call, but the dirty
flag is set to false after save.
I can add a processor, but I need to perform my actions after the model data is saved.