instance method get_session

Ruby on Rails 3.2.22.5

Since v2.3.18 Last seen in v3.2.22.5 Private

Available in: v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

get_session(env, sid)

No documentation comment.

Parameters

env req
sid req
Source
# File activerecord/lib/active_record/session_store.rb, line 306
      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

Defined in activerecord/lib/active_record/session_store.rb line 306 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::SessionStore

Type at least 2 characters to search.

↑↓ navigate · open · esc close