method
get_session
v3.1.0 -
Show latest stable
- Class:
ActiveRecord::SessionStore
get_session(env, sid)private
No documentation available.
# File activerecord/lib/active_record/session_store.rb, line 304
def get_session(env, sid)
Base.silence do
unless sid and session = @@session_class.find_by_session_id(sid)
# If the sid was nil or if there is no pre-existing session under the sid,
# force the generation of a new sid and associate a new session associated with the new sid
sid = generate_sid
session = @@session_class.new(:session_id => sid, :data => {})
end
env[SESSION_RECORD_KEY] = session
[sid, session.data]
end
end