I''ve been looking around for how to store the session ID in a cookie. The "Agile Web Development 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 -- Posted via http://www.ruby-forum.com/.
Jake Janovetz wrote:> I''ve been looking around for how to store the session ID in a cookie. > The "Agile Web Development 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. > > JakeYes, 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] -- Posted via http://www.ruby-forum.com/.
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 -- Posted via http://www.ruby-forum.com/.