# Flash

**URL:** <https://www.ruby-forum.com/t/flash/100572>\
**Category:** Rails\
**Created:** [July 30, 2006, 10:27am UTC](https://www.ruby-forum.com/t/flash/100572 "2006-07-30T10:27:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![neha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@neha](https://www.ruby-forum.com/u/neha)\
**Post date:** [July 30, 2006, 10:27am UTC](https://www.ruby-forum.com/t/flash/100572/1 "2006-07-30T10:27:35Z")

</div>

Why is Flash important for session data?

---

<div class="post-metadata">

**Author:** ![neha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@neha](https://www.ruby-forum.com/u/neha)\
**Post date:** [July 31, 2006, 1:08am UTC](https://www.ruby-forum.com/t/flash/100572/2 "2006-07-31T01:08:47Z")

</div>

You are not giving enough information to really answer this question.  
I’ll take a stab anyway:

Things like flash[:notice] and friends do not refer to Macromedia  
Flash, but rather a generic mechanism to display small informational  
messages in your views, such as “Object has been successfully saved”.

Max

---

<div class="post-metadata">

**Author:** ![neha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@neha](https://www.ruby-forum.com/u/neha)\
**Post date:** [April 23, 2009, 7:14am UTC](https://www.ruby-forum.com/t/flash/100572/3 "2009-04-23T07:14:25Z")

</div>

Are you sure there’s not a double redirect? This can happen if you’re  
using  
a plugin like ssl\_requirement, where the initial redirect to login\_path  
goes  
to port 80, then the plugin jumps in and redirects to the same url on  
port  
443.

-John

On Wed, Apr 22, 2009 at 7:30 AM, Amos K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ## – Amos K. aka: Adkron [http://dirtyInformation.com](http://dirtyInformation.com) [adkron (Amos King) · GitHub](http://github.com/Adkron)
> 
> Looking for something to do? Visit [http://ImThere.com](http://ImThere.com)
> 
> >

–  
John T.  
President  
SmartLogic Solutions  
[http://www.smartlogicsolutions.com](http://www.smartlogicsolutions.com)  
@jtrupiano

---

<div class="post-metadata">

**Author:** ![neha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@neha](https://www.ruby-forum.com/u/neha)\
**Post date:** [April 23, 2009, 9:39am UTC](https://www.ruby-forum.com/t/flash/100572/4 "2009-04-23T09:39:13Z")

</div>

We are only using ssl. It worked before the last upgrade. I can’t  
find a double redirect.

On Wed, Apr 22, 2009 at 7:10 AM, John T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > release, when I had:  
> > [http://dirtyInformation.com](http://dirtyInformation.com)  
> > President  
> > SmartLogic Solutions  
> > [http://www.smartlogicsolutions.com](http://www.smartlogicsolutions.com)  
> > @jtrupiano
> 
> >

## – Amos K. [http://dirtyInformation.com](http://dirtyInformation.com) [adkron (Amos King) · GitHub](http://github.com/Adkron)

Looking for something to do? Visit [http://ImThere.com](http://ImThere.com)

---

<div class="post-metadata">

**Author:** ![neha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@neha](https://www.ruby-forum.com/u/neha)\
**Post date:** [April 28, 2009, 4:23pm UTC](https://www.ruby-forum.com/t/flash/100572/5 "2009-04-28T16:23:28Z")

</div>

I’l have to find it. The team changed it to a render instead of a  
redirect(as a temp fix) I have to change it back to tell you. We  
really hacked it. I had redirect\_to :index and now it is:

#update\_code  
index  
render :index  
#failed update code

Horrible!

I’ll get on changing it back and let you know.

On Wed, Apr 22, 2009 at 6:28 PM, Michael K.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> No, and this works for me at present. Â As John mentioned, the double
> 
> >

## – Amos K. [http://dirtyInformation.com](http://dirtyInformation.com) [adkron (Amos King) · GitHub](http://github.com/Adkron)

Looking for something to do? Visit [http://ImThere.com](http://ImThere.com)

---

<div class="post-metadata">

**Author:** ![neha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@neha](https://www.ruby-forum.com/u/neha)\
**Post date:** [April 28, 2009, 4:24pm UTC](https://www.ruby-forum.com/t/flash/100572/6 "2009-04-28T16:24:39Z")

</div>

err  
render(redirect\_to) :action=\> ‘index’  
sorry

On Tue, Apr 28, 2009 at 9:22 AM, Amos K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > > [http://dirtyInformation.com](http://dirtyInformation.com)  
> > > Cheers  
> > > [http://dirtyInformation.com](http://dirtyInformation.com)  
> > > [adkron (Amos King) · GitHub](http://github.com/Adkron)  
> > > –  
> > > Looking for something to do? Visit [http://ImThere.com](http://ImThere.com)

## – Amos K. [http://dirtyInformation.com](http://dirtyInformation.com) [adkron (Amos King) · GitHub](http://github.com/Adkron)

Looking for something to do? Visit [http://ImThere.com](http://ImThere.com)

---

<div class="post-metadata">

**Author:** ![neha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@neha](https://www.ruby-forum.com/u/neha)\
**Post date:** [April 23, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/flash/100572/7 "2009-04-23T18:31:10Z")

</div>

> Should flash still be persisting through redirects? Until the recent  
> release, when I had:
> 
> flash[:error] = “Foo”  
> redirect\_to login\_url
> 
> The flash would be populated and displayed on the login page. Now the  
> flash is being cleared. Is this intentional, and if so why?

No, and this works for me at present. As John mentioned, the double  
redirect is the likely cause. What do your logs show?

> ## – Amos K. aka: Adkron [http://dirtyInformation.com](http://dirtyInformation.com) [adkron (Amos King) · GitHub](http://github.com/Adkron)
> 
> Looking for something to do? Visit [http://ImThere.com](http://ImThere.com)
> 
> >

–  
Cheers

Koz

---

<div class="post-metadata">

**Author:** ![neha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@neha](https://www.ruby-forum.com/u/neha)\
**Post date:** [May 19, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/flash/100572/8 "2009-05-19T19:45:07Z")

</div>

I’m dealing with this issue as well and as far as I can tell there is  
only a single redirect. Has anybody figured out the problem?

---

<div class="post-metadata">

**Author:** ![neha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@neha](https://www.ruby-forum.com/u/neha)\
**Post date:** [April 28, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/flash/100572/9 "2009-04-28T16:48:50Z")

</div>

It is a single redirect. Here is the log.

Processing User::MemberInfoController#index (for 127.0.0.1 at  
2009-04-28 09:44:23) [GET]  
Parameters: {“action”=\>“index”, “controller”=\>“user/member\_info”}  
Member Load (12.4ms) SELECT \* FROM `member` WHERE  
(`member`.`username` = ‘factoryusername1’) LIMIT 1  
MemberAvatar Load (0.2ms) SELECT \* FROM `member_avatars` WHERE  
(`member_avatars`.member\_id = ‘id1’) LIMIT 1  
Rendering template within layouts/main  
Rendering user/member\_info/index  
Rendered user/member\_info/\_form (8.1ms)  
Rendered user/member\_info/\_avatar (3.6ms)  
Skill Load (0.3ms) SELECT \* FROM `skills` WHERE  
(`skills`.member\_id = ‘id1’)  
Rendered user/member\_info/\_skill\_summary (93.3ms)  
Rendered user/member\_info/\_password\_form (4.0ms)  
Rendered layouts/\_doctype (0.1ms)  
Rendered shared/\_welcome (0.1ms)  
Rendered layouts/\_navigation (0.4ms)  
Rendered layouts/\_header (0.9ms)  
Rendered layouts/\_error\_section (0.2ms)  
SiteLink Load (0.4ms) SELECT \* FROM `customlink` WHERE (  
(`customlink`.`type` = ‘SiteLink’ ) )  
SQL (0.3ms) SELECT count(\*) AS count\_all FROM `memberproject`  
WHERE (((`memberproject`.`status` = ‘ACT’) AND  
(`memberproject`.memberid = ‘id1’)) AND (`memberproject`.memberid =  
‘id1’)) LIMIT 6  
Rendered layouts/\_page\_footer (4.3ms)  
Rendered layouts/\_navigation (0.3ms)  
Rendered layouts/\_footer (0.6ms)  
Completed in 137ms (View: 121, DB: 14) | 200 OK  
[[http://www.example.com/user/member\_info](http://www.example.com/user/member_info)]  
REQUESTING PAGE: POST /user/member\_info/updatePass with  
{“commit”=\>“Change Password”, “password\_confirmation”=\>[“111111”],  
“memberid”=\>[“id1”], “new\_password”=\>[“111111”],  
“password”=\>[“111111”]} and HTTP headers  
{“HTTP\_REFERER”=\>“/user/member\_info”}

Processing User::MemberInfoController#updatePass (for 127.0.0.1 at  
2009-04-28 09:44:24) [POST]  
Parameters: {“commit”=\>“Change Password”,  
“password\_confirmation”=\>“[FILTERED]”, “memberid”=\>[“id1”],  
“action”=\>“updatePass”, “controller”=\>“user/member\_info”,  
“new\_password”=\>“[FILTERED]”, “password”=\>“[FILTERED]”}  
Member Load (12.3ms) SELECT \* FROM `member` WHERE  
(`member`.`username` = ‘factoryusername1’) LIMIT 1  
Member Load (1.5ms) SELECT \* FROM `member` WHERE  
(`member`.`memberid` IN (‘id1’)) LIMIT 1  
Redirected to [http://www.example.com/user/member\_info](http://www.example.com/user/member_info)  
Completed in 17ms (DB: 15) | 302 Found  
[[http://www.example.com/user/member\_info/updatePass](http://www.example.com/user/member_info/updatePass)]  
REQUESTING PAGE: GET [http://www.example.com/user/member\_info](http://www.example.com/user/member_info) with {}  
and HTTP headers {“HTTP\_REFERER”=\>“/user/member\_info/updatePass”}

Processing User::MemberInfoController#index (for 127.0.0.1 at  
2009-04-28 09:44:24) [GET]  
Parameters: {“action”=\>“index”, “controller”=\>“user/member\_info”}  
Member Load (1.0ms) SELECT \* FROM `member` WHERE  
(`member`.`username` = ‘factoryusername1’) LIMIT 1  
MemberAvatar Load (0.2ms) SELECT \* FROM `member_avatars` WHERE  
(`member_avatars`.member\_id = ‘id1’) LIMIT 1  
Rendering template within layouts/main  
Rendering user/member\_info/index  
Rendered user/member\_info/\_form (2.7ms)  
Rendered user/member\_info/\_avatar (0.4ms)  
Skill Load (0.2ms) SELECT \* FROM `skills` WHERE  
(`skills`.member\_id = ‘id1’)  
Rendered user/member\_info/\_skill\_summary (1.2ms)  
Rendered user/member\_info/\_password\_form (0.8ms)  
Rendered layouts/\_doctype (0.1ms)  
Rendered shared/\_welcome (0.1ms)  
Rendered layouts/\_navigation (0.4ms)  
Rendered layouts/\_header (0.8ms)  
Rendered layouts/\_error\_section (0.2ms)  
SiteLink Load (0.3ms) SELECT \* FROM `customlink` WHERE (  
(`customlink`.`type` = ‘SiteLink’ ) )  
SQL (0.3ms) SELECT count(\*) AS count\_all FROM `memberproject`  
WHERE (((`memberproject`.`status` = ‘ACT’) AND  
(`memberproject`.memberid = ‘id1’)) AND (`memberproject`.memberid =  
‘id1’)) LIMIT 6  
Rendered layouts/\_page\_footer (3.6ms)  
Rendered layouts/\_navigation (0.3ms)  
Rendered layouts/\_footer (0.6ms)  
Completed in 17ms (View: 13, DB: 3) | 200 OK  
[[http://www.example.com/user/member\_info](http://www.example.com/user/member_info)]  
SQL (1.0ms) ROLLBACK

The first action is getting to the page that lists all the  
information. Then there is an updatePass action the redirects to  
index. Sorry about the conventions this is an old part of the  
application and was written before the team had known much about ruby  
or rails. Right now it is difficult to change because we are  
interacting with a legacy application that is not well tested.

On Tue, Apr 28, 2009 at 9:24 AM, Amos K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > index
> > 
> > > > Should flash still be persisting through redirects? Â Until the recent
> > > 
> > > >
> 
> ## – Amos K. [http://dirtyInformation.com](http://dirtyInformation.com) [adkron (Amos King) · GitHub](http://github.com/Adkron)
> 
> Looking for something to do? Visit [http://ImThere.com](http://ImThere.com)

## – Amos K. [http://dirtyInformation.com](http://dirtyInformation.com) [adkron (Amos King) · GitHub](http://github.com/Adkron)

Looking for something to do? Visit [http://ImThere.com](http://ImThere.com)
