# Callback method for field

**URL:** <https://www.ruby-forum.com/t/callback-method-for-field/138230>\
**Category:** Rails\
**Created:** [May 21, 2008, 7:17am UTC](https://www.ruby-forum.com/t/callback-method-for-field/138230 "2008-05-21T07:17:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayyanar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Post date:** [May 21, 2008, 7:17am UTC](https://www.ruby-forum.com/t/callback-method-for-field/138230/1 "2008-05-21T07:17:15Z")

</div>

Is there callback method for field level?

Generally, after\_create and after\_save will fire at object level.

I need to fire some code when the value for the field is changed. I need  
to call the call back method from observer

---

<div class="post-metadata">

**Author:** ![ayyanar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Post date:** [May 21, 2008, 7:23am UTC](https://www.ruby-forum.com/t/callback-method-for-field/138230/2 "2008-05-21T07:23:09Z")

</div>

when the value is updated for object.attribute1, I need to write some  
logic  
in the observer.

after\_create(object) will not work for me since I cannot set the value  
for  
the object.attribute1 when the object is created. I should set the value  
after the object is created as per requirement. So I need the observer  
to look for the change and act accordingly
