Alex Rivera | Logout

Accessing the "session key" cookie name from anywhere in Rails

Asked 2009-06-16T13:46:44.797
17

We are building a plugin for Rails to be used within iframe Facebook applications, and at one point we need to check if Rail's session id cookie as been set or not.

By default, this cookie is named _myprojectname_session, what we need to find out is the actual name of the cookie itself. So if it's not set, we can do some redirects to make sure the cookies are set.

How do we access the damn name of the cookie from anywhere? Or at least from within a controller?

Edit
Report

1 Answer

1

In my experience, if there is an underscore in the key, IE SOMETIMES does not set the cookies. In other words, use 'projectsession' instead of '_project_session'.

answered 2011-03-19T02:07:15.157

Your Answer