- Look in tmp/sessions and find the most recent file (ls -alrt on UNIX). Let's say the file is called 'tmp/sessions/ruby_sess.8eb9614a7e4e1e3b'
- Open console and type:
>> session = Marshal.load(File.open('tmp/sessions/ruby_sess.8eb9614a7e4e1e3b')) => {"hash"=>{:cart=... >> cart = session["hash"][:cart] ....
In this case I was trying to access a cart object in the session, which was placed in the session with:session[:cart] = Cart.new
Session stored in the DB:
# Session.find_by_id(:my_session_id)
# CGI::Session::ActiveRecordStore::Session.find_by_session_id(session_id)
No comments:
Post a Comment