# Dirty Fields in Rails 1.2.6

**URL:** <https://www.ruby-forum.com/t/dirty-fields-in-rails-1-2-6/146900>\
**Category:** Rails\
**Created:** [August 26, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/dirty-fields-in-rails-1-2-6/146900 "2008-08-26T16:25:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ee7513/32.png) [@arun](https://www.ruby-forum.com/u/arun)\
**Post date:** [August 26, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/dirty-fields-in-rails-1-2-6/146900/1 "2008-08-26T16:25:04Z")

</div>

Hi Friends,

I am using Rails 1.2.6 in my application. I need to use the  
functionality of “dirty fields” (getting previous value of an object’s  
attributes). I know “Dirty fields” features are already in edge rails.  
But i want to do the same in my current rails version… any ideas?

i tried the dirty plugin which is given here  
([http://dev.rubyonrails.org/browser/trunk/activerecord/lib/active\_record/dirty.rb?rev=9127](http://dev.rubyonrails.org/browser/trunk/activerecord/lib/active_record/dirty.rb?rev=9127))

After including this module (from the above url) to my active record  
base class, my active record object are able to show the status -  
whether object is changed or not (using the method - obj.changed? ) but  
they are unable to show the changed values, instead it always give an  
empty hash ( method - “obj.changes”)

I need to get the previous value for the modified object’s attributes

can anybody help on this?
