views:

23

answers:

1

Is there a way to get the current variable? lets say that i have a "title" attribute in a method and i want to check in with the old value of the variable ?

how could i accomplish this ?

+2  A: 

ActiveRecord provides a whole set of methods which work on "Dirty" attributes.

In your case, you can call title_was to get the most recently saved version of that variable

Gareth
Thanxs! i wasn't able to find it in the api. But i didn't know what i was searching for :P..