문제

How do I clear the rails session so I can start with a fresh slate? I know I could just nullify each of the session variables with session[:my_var] = nil, but is there a rake task or something that knows how to restore the session data to its most basic form?

I'm using Spree and it stores a few properties in the session that I would like to clear out to see what's going on in the background, such as order_id, order_token, user_credentials_id, etc.

I'm using SQLite3

도움이 되었습니까?

해결책

rake db:sessions:clear

다른 팁

Check your session_store in your environment.rb file. You can use the "db:sessions:clear" only if it says active_record. In this case you are dumping your session in db.

Otherwise just clear your browser cookies.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top