Forum: Ruby on Rails Session ID in a cookie?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jake J. (Guest)
on 2006-02-11 22:56
I've been looking around for how to store the session ID in a cookie.
The "Agile Web D. with Rails" books seems to indicate that this
is done by default with Rails.  But I don't see a cookie being set in my
browser.  (yeah, they're enabled)

I poked through the RForum code to find something referencing "cookies"
but nothing came up.

Does this need to be done manually?  Basically, I want a checkbox
("Remember me" sort of thing) on my login screen.

   Jake
Tom B. (Guest)
on 2006-02-12 00:33
Jake J. wrote:
> I've been looking around for how to store the session ID in a cookie.
> The "Agile Web D. with Rails" books seems to indicate that this
> is done by default with Rails.  But I don't see a cookie being set in my
> browser.  (yeah, they're enabled)
>
> I poked through the RForum code to find something referencing "cookies"
> but nothing came up.
>
> Does this need to be done manually?  Basically, I want a checkbox
> ("Remember me" sort of thing) on my login screen.
>
>    Jake

Yes, cookie is beeing set by default with Rails. Try to find them
_session_id
But still You can set more of them manually.

This will help You for "Remember me".
::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:session_expires
=> 4.weeks.from_now) if params[:remember_me]
Jake J. (Guest)
on 2006-02-12 05:58
Tom Bernag wrote:
> Yes, cookie is beeing set by default with Rails. Try to find them
> _session_id
> But still You can set more of them manually.
>
> This will help You for "Remember me".
> ::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:session_expires
> => 4.weeks.from_now) if params[:remember_me]

Thanks, Tom.  I'm not sure why I wasn't seeing it.  I cleared my cookies
and started over and there it was.  Probably just overlooked it.

   Jake
This topic is locked and can not be replied to.