# Newbie help

**URL:** <https://www.ruby-forum.com/t/newbie-help/150752>\
**Category:** Rails\
**Created:** [October 12, 2008, 5:02pm UTC](https://www.ruby-forum.com/t/newbie-help/150752 "2008-10-12T17:02:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mex23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mex23](https://www.ruby-forum.com/u/mex23)\
**Post date:** [October 12, 2008, 5:02pm UTC](https://www.ruby-forum.com/t/newbie-help/150752/1 "2008-10-12T17:02:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mex23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mex23](https://www.ruby-forum.com/u/mex23)\
**Post date:** [October 12, 2008, 6:51pm UTC](https://www.ruby-forum.com/t/newbie-help/150752/2 "2008-10-12T18:51:33Z")

</div>

On Sun, Oct 12, 2008 at 8:02 AM, Stefano B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 = ‘’

:: with the appropriate values.

## HTH!

Hassan S. ------------------------ removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![mex23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mex23](https://www.ruby-forum.com/u/mex23)\
**Post date:** [October 12, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/newbie-help/150752/3 "2008-10-12T19:02:28Z")

</div>

Hassan S. wrote:

> On Sun, Oct 12, 2008 at 8:02 AM, Stefano B.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 = ‘’
> 
> :: with the appropriate values.
> 
> ## HTH!
> 
> Hassan S. ------------------------ removed\_email\_address@domain.invalid

Thanks a lot Hassan! It works perfectly!

---

<div class="post-metadata">

**Author:** ![mex23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mex23](https://www.ruby-forum.com/u/mex23)\
**Post date:** [October 12, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/newbie-help/150752/4 "2008-10-12T19:32:05Z")

</div>

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 B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
