render :update do |page|
page.replace_html 'div1', "HAHA"
page.replace_html 'div2', :partial => 'person', :object => @person
OR, you can create a rjs template:show.js.rjs, and put the rjs code there.
In the controller, you'll then have:
def show
...
#no render at all
end
Rails will pick the right template automatically.
Official rjs docs
1 comment:
Thanks...it was useful
Post a Comment