Hi,
I would like to have link_to_remote call my action and that action update the page of its progress using RJS.
In my view, I have: <%= link_to_remote 'run lots of code', :url => { :action => 'lots_of_code' } %> <span id="progress"></span>
In my controller, I have: def lots_of_code render(:update) do |page| page.replace_html 'progress', 'test' end sleep(3) @performed_render = false render(:update) do |page| page.replace_html 'progress', 'test2' end end
Basically, on the page I want to have 'test' appear, and then 'test2' appear 3 seconds later. I want to somehow flush the response buffer before the @performed_render line. Is there any way to do this? Or, is there a better way to accomplish what I want?
Thanks in advance, Gabe