ruby on rails - How to delete cookie when window closed? -
so, have current_user method, takes id cookie's auth_token
, , want cookie deleted when window site has been closed.
cookies[:auth_token] = @user.auth_token
what have add?
actually, if set cookie without giving expiration date, retained until browser closed. (which can mean program itself, not window or tab.)
an expiration in past delete cookie immediately.
from thread: http://www.ruby-forum.com/topic/94682
@joe half face, if helps you, please mark useful.
Comments
Post a Comment