Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add find and set methods to Session object

  • Loading branch information...
commit 49b2f25f709b40630d934b0a54830ddc21e2e56a 1 parent 42b11a7
Santiago Pastorino spastorino authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/rack/session/abstract/id.rb
8 lib/rack/session/abstract/id.rb
View
@@ -24,6 +24,14 @@ class SessionHash
include Enumerable
attr_writer :id
+ def self.find(env)
+ env[ENV_SESSION_KEY]
+ end
+
+ def self.set(env, session)
+ env[ENV_SESSION_KEY] = session
+ end
+
def self.set_options(env, options)
env[ENV_SESSION_OPTIONS_KEY] = options.dup
end
Please sign in to comment.
Something went wrong with that request. Please try again.