Hi, I have a view, where I need to display some text and then after 5 seconds, redirect to an action automatically (sending one parameter too). Googling I''ve found only solutions for PHP and others, nothing for Ruby on Rails. How can I do in ROR ? Many thanks in advance -- 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 -~----------~----~----~----~------~----~------~--~---
Hi! (Ciao), I do something like what you want with ajax components. I''ve used an observer... now i''ve not the code, but if you write to me I can send it bye, Mario On 12 Ott, 17:02, Stefano Bonomi <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > I have a view, where I need to display some text and then after 5 > seconds, redirect to an action automatically (sending one parameter > too). > > Googling I''ve found only solutions for PHP and others, nothing for Ruby > on Rails. > > How can I do in ROR ? > > Many thanks in advance > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
On Sun, Oct 12, 2008 at 8:02 AM, Stefano Bonomi <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have a view, where I need to display some text and then after 5 > seconds, redirect to an action automatically (sending one parameter > too).Since this is client-side behavior, it has nothing to do with PHP, RoR or any other platform. You can do this using either JavaScript or a META tag. For the latter, put something like this in the head of your layout: <%= @refresh %> :: and something like this in your controller: @refresh = ''<meta http-equiv="refresh" content="5;url=/foo/param"/>'' :: with the appropriate values. HTH! -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hassan Schroeder wrote:> On Sun, Oct 12, 2008 at 8:02 AM, Stefano Bonomi > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Since this is client-side behavior, it has nothing to do with PHP, RoR > or any other platform. You can do this using either JavaScript or a > META tag. > > For the latter, put something like this in the head of your layout: > > <%= @refresh %> > > :: and something like this in your controller: > > @refresh = ''<meta http-equiv="refresh" content="5;url=/foo/param"/>'' > > :: with the appropriate values. > > HTH! > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.orgThanks a lot Hassan! It works perfectly! -- 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 -~----------~----~----~----~------~----~------~--~---