lib/rack/session/abstract/id.rb
# Extracts the session id from provided cookies and passes it and the
# environment to #get_session. It then sets the resulting session into
# 'rack.session', and places options and session metadata into
# 'rack.session.options'.
Extracts the session id from provided cookies and passes it and the
environment to #get_session. It then sets the resulting session into
'rack.session', and places options and session metadata into
'rack.session.options'.
Extracts the session id from provided cookies and passes it and the environment to #get_session . It then sets the resulting session into ' rack . session ' and places options and session metadata into ' rack . session . options ' .
def load_session(env)
          request = Rack::Request.new(env)
          session_id = request.cookies[@key]
          begin
            session_id, session = get_session(session_id)
            env['rack.session'] = session
          rescue
            env['rack.session'] = Hash.new
          end
          env['rack.session.options'] = @default_options.
            merge(:id => session_id)
        end
def load_session ( env ) request = Rack :: Request . new ( env ) session_id = request . cookies [ @key ] begin session_id , session = get_session ( session_id ) env [ 'rack.session' ] = session rescue env [ 'rack.session' ] = Hash . new end env [ 'rack.session.options' ] = @default_options . merge ( :id => session_id ) end
Extracts the session id from provided cookies and passes it and the
environment to #get_session.
Extracts the session id from provided cookies and passes it and the environment to #get_session .
env