# Best way to check if a field is changed upon update to run a

**URL:** <https://www.ruby-forum.com/t/best-way-to-check-if-a-field-is-changed-upon-update-to-run-a/87609>\
**Category:** Rails\
**Created:** [March 4, 2007, 12:09pm UTC](https://www.ruby-forum.com/t/best-way-to-check-if-a-field-is-changed-upon-update-to-run-a/87609 "2007-03-04T12:09:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marstoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@marstoni](https://www.ruby-forum.com/u/marstoni)\
**Post date:** [March 4, 2007, 12:09pm UTC](https://www.ruby-forum.com/t/best-way-to-check-if-a-field-is-changed-upon-update-to-run-a/87609/1 "2007-03-04T12:09:46Z")

</div>

So I have a settings table with a boolean column in it. It is mostly  
1, but in the case it changes (either way) I need to run a method via  
an after filter. This is probably an easy answer but I want to know  
whats the best way to check in my after filter method (or should I do  
this test elsewhere? Maybe in the actual update statement?) whether  
the boolean field has changed from what it was? Thanks.
