Site Archives session
Accessing session data using session_id
This is the very rare case but some times we need to access the data stored in session through session_id(specially when the request is not coming from browser). Here is a way I found and like to share:
@user=CGI::Session::ActiveRecordStore::Session.find_by_session_id(@session_id).data[:user]
Find It Quickly
Find what you're looking for quickly by using our keyword search. Can't find it? Try our links below.