# Difference in render and render :update

**URL:** <https://www.ruby-forum.com/t/difference-in-render-and-render-update/138274>\
**Category:** Rails\
**Created:** [May 21, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/difference-in-render-and-render-update/138274 "2008-05-21T16:10:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [May 21, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/difference-in-render-and-render-update/138274/1 "2008-05-21T16:10:40Z")

</div>

I have a situation where i am using extjs for my tab layouts.  
When i am getting a tab to be loaded i am making a call to a method and  
from there i do  
if(some condition)  
render :partial=\>‘x’  
else  
render :partial=\>‘y’  
end

When partial ‘x’ is rendered, upon some successful completion of an ajax  
call i then render partial ‘y’ by doing

render :update do |page|  
page.replace\_html ‘div\_id’, :partial=\>‘y’  
end

Now the issue is in partial ‘y’ i have an observer and it gets fired if  
am coming to that partial from x and then y. But if i come to the y  
partial straightaway the observer is not getting fired at all.

Can someone help me with what could be the difference that is not  
letting the observer to fire.
