Alex Rivera | Logout

Command to clear the cookie-based session store in Rails

Asked 2009-08-07T05:54:58.497
11

I often want to clear the session store in Rails, in particular, the default cookie-based session store. Some sites seem to suggest that

rake tmp:sessions:clear

accomplishes this task, but it appears that it does not. What is the proper way to clear the cookie-based session store?

Edit
Report

1 Answer

9

Change the name of the session cookie. It won't delete the old cookies, but it'll force everyone to get a new session cookie.

answered 2011-06-16T19:00:29.133

Your Answer