Model and Attribute original Value

Hi Everyone,

Is there a way to when you find a record to keep the original value of the attributes. This would allow to see if an attribute has changed at save time and then do something. I am sure there is an cool way in rails to do this!

Thanks......

You can store it in the #after_find hook:

  class Thing < ActiveRecord::Base     def after_find       @original_name = name     end   end

Have a look at acts_as_audited it does exactly what you want.

Both brilliant options.... Thank you for your help!