Browse the Ruby on Rails Community.

You are here: Forums Ask a Rails expert Difference in render and rende...

Replytotopic

Difference in render and render :update

Posted in Forums : Ask a Rails expert

 
Profile

Authority 0
Posting Rating 0
Sign in to rate this post

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.

Replytotopic

Other Recent Topics

Ask a Rails expert : how to write in model

Ask a Rails expert : how to show the params value in page.alert

Ask a Rails expert : Cutomize Will_Paginate next & previouse links

Ask a Rails expert : support AJAX pagination with Will_Paginate plug-in

Ask a Rails expert : Inheritance Determination in View

Ask a Rails expert : Install rails application

Ask a Rails expert : custom sql query

Ask a Rails expert : session handling does not work with REST API

Ask a Rails expert : Display WSDL

Ask a Rails expert : Howto respond a XML error message when there is no @active_record_obj?

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel