Hi everybody! I''m working on a small Rails app which lets the user enter a small script & submit it. This app then launches a third party executable to parse that script, and finally shows the result. The execution time from the third party app can be somewhat long, and I''d like to show a spinner meanwhile. I used 3 different actions (index / execute / result) in the same controller. Thanks to a form_remote_tag, ''execute'' action is called from index, while displaying a spinner.gif. But I''d like my app to redirect to ''result'' action when ''execute'' is finished. Is that possible? I tried with def execute .... .... redirect_to :action=>''result'' end but my browser stays on index page, and doesn''t display anything from ''result'' action. I also tried to use render :update inside ''result'' action, in order to update index page. It works, but a browser refresh with F5 destroys results and show an empty index page. Is something wrong in my structure? Is it possible to show a spinner without using AJAX? Thanks a lot, Eric --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
def execute .... .... render :update do |page| page.redirect_to :controller => ''blahblah'', :action=>''result'' end end or in execute.rjsj page.redirect_to :controller => ''blahblah'', :action=>''result'' -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Exactly what I was looking for, thanks! On 04/10/2007, Francis Sinson <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > def execute > .... > .... > render :update do |page| > page.redirect_to :controller => ''blahblah'', :action=>''result'' > end > end > > or in execute.rjsj > > page.redirect_to :controller => ''blahblah'', :action=>''result'' > > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---