I want to destroy user session and expire cookies whenever i close the browser. To expire cookies i try to create cookies without expiration time but not work.
EDIT :
cookies[:test] = {value: "test123", domain: :all}
I create this cookie and i want when i close the broswer , the is not available there . and when user log in i set current user with session (session[:user_id= @user.id
) and I want when I close the browser , session[:user_id]
should be null.