Flash

Why is Flash important for session data?

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

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. [email protected]
wrote:


Amos K.
aka: Adkron
http://dirtyInformation.com
http://github.com/Adkron

Looking for something to do? Visit http://ImThere.com


John T.
President
SmartLogic Solutions
http://www.smartlogicsolutions.com
@jtrupiano

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. [email protected]
wrote:

release, when I had:
http://dirtyInformation.com
President
SmartLogic Solutions
http://www.smartlogicsolutions.com
@jtrupiano


Amos K.
http://dirtyInformation.com
http://github.com/Adkron

Looking for something to do? Visit http://ImThere.com

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.
[email protected] wrote:

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


Amos K.
http://dirtyInformation.com
http://github.com/Adkron

Looking for something to do? Visit http://ImThere.com

err
render(redirect_to) :action=> ‘index’
sorry

On Tue, Apr 28, 2009 at 9:22 AM, Amos K. [email protected]
wrote:

http://dirtyInformation.com
Cheers
http://dirtyInformation.com
http://github.com/Adkron

Looking for something to do? Visit http://ImThere.com


Amos K.
http://dirtyInformation.com
http://github.com/Adkron

Looking for something to do? Visit http://ImThere.com

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://github.com/Adkron

Looking for something to do? Visit http://ImThere.com


Cheers

Koz

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?

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]
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
Completed in 17ms (DB: 15) | 302 Found
[http://www.example.com/user/member_info/updatePass]
REQUESTING PAGE: GET 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]
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. [email protected]
wrote:

index

Should flash still be persisting through redirects? Â Until the recent


Amos K.
http://dirtyInformation.com
http://github.com/Adkron

Looking for something to do? Visit http://ImThere.com


Amos K.
http://dirtyInformation.com
http://github.com/Adkron

Looking for something to do? Visit http://ImThere.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs