# Get a list of updated fields in Model.update?

**URL:** <https://www.ruby-forum.com/t/get-a-list-of-updated-fields-in-model-update/112298>\
**Category:** Rails\
**Created:** [August 17, 2007, 8:49am UTC](https://www.ruby-forum.com/t/get-a-list-of-updated-fields-in-model-update/112298 "2007-08-17T08:49:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dan](https://www.ruby-forum.com/u/dan)\
**Post date:** [August 17, 2007, 8:49am UTC](https://www.ruby-forum.com/t/get-a-list-of-updated-fields-in-model-update/112298/1 "2007-08-17T08:49:05Z")

</div>

Is there a spiffy Rails way to easily get a list of fields updated in  
an update call? I figure it’s possible to go into the model and keep  
track of what fields are changed in each field=() method (before the  
save happens), but I’m hoping that there is a method that will do that  
for me. Any ideas?

Thanks.

---

<div class="post-metadata">

**Author:** ![dan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dan](https://www.ruby-forum.com/u/dan)\
**Post date:** [August 17, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/get-a-list-of-updated-fields-in-model-update/112298/2 "2007-08-17T14:06:00Z")

</div>

Dan wrote:

> Is there a spiffy Rails way to easily get a list of fields updated in  
> an update call? I figure it’s possible to go into the model and keep  
> track of what fields are changed in each field=() method (before the  
> save happens), but I’m hoping that there is a method that will do that  
> for me. Any ideas?

acts\_as\_modified is a plugin that does what you want

[http://svn.viney.net.nz/things/rails/plugins/acts\_as\_modified/](http://svn.viney.net.nz/things/rails/plugins/acts_as_modified/)

–Al Evans

---

<div class="post-metadata">

**Author:** ![dan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dan](https://www.ruby-forum.com/u/dan)\
**Post date:** [August 17, 2007, 2:19pm UTC](https://www.ruby-forum.com/t/get-a-list-of-updated-fields-in-model-update/112298/3 "2007-08-17T14:19:44Z")

</div>

That’s exactly what I’m looking for! Thanks!
