# Rendering rjs after redirect

**URL:** <https://www.ruby-forum.com/t/rendering-rjs-after-redirect/146149>\
**Category:** Rails\
**Created:** [August 18, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/rendering-rjs-after-redirect/146149 "2008-08-18T15:46:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 18, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/rendering-rjs-after-redirect/146149/1 "2008-08-18T15:46:07Z")

</div>

Hello all,

Using scaffolded code, I create a new rails object and, when  
successful, forward to show, at which point I display a notice with  
the flash indicating all is well. Now, I want that flash notice to  
fade away using rjs, however, I cannot achieve this. I am able render  
the rjs using ajax but not on a redirect or page reload?

Can anyone help out with this?

j

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 18, 2008, 8:23pm UTC](https://www.ruby-forum.com/t/rendering-rjs-after-redirect/146149/2 "2008-08-18T20:23:50Z")

</div>

rjs is meant to be used for Ajax requests. If you want to do some  
fancy stuff with your flash notice, you’ll have to use something like  
Prototype to do it.

On Aug 18, 7:45 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 19, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/rendering-rjs-after-redirect/146149/3 "2008-08-19T20:26:55Z")

</div>

This (and other Ajaxy screencasts from Ryan B.) may be of help:

> **[\#43 AJAX with RJS - RailsCasts](http://railscasts.com/episodes/43-ajax-with-rjs)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.

-Whinnery

On Aug 18, 8:45 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
