Rails: attribute_changed?

Posted by Sam on Stack Overflow See other posts from Stack Overflow or by Sam
Published on 2010-05-31T07:54:51Z Indexed on 2010/05/31 8:02 UTC
Read the original article Hit count: 96

Filed under:

I have a model that has an amount and I'm tracking to see if this amount is changed with a Model.amount_changed? with a before_save which works fine but when I check to see amount_was and amount_change? it only returns the updated amount not the previous amount. And all this is happening before it is save. It knows when the attribute is changed but it will not return the old value.

Ideas?

© Stack Overflow or respective owner

Related posts about ruby-on-rails