Skip to content
This repository
Browse code

Add find and set methods to Session object

  • Loading branch information...
commit 49b2f25f709b40630d934b0a54830ddc21e2e56a 1 parent 42b11a7
Santiago Pastorino authored

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  lib/rack/session/abstract/id.rb
8  lib/rack/session/abstract/id.rb
@@ -24,6 +24,14 @@ class SessionHash
24 24
         include Enumerable
25 25
         attr_writer :id
26 26
 
  27
+        def self.find(env)
  28
+          env[ENV_SESSION_KEY]
  29
+        end
  30
+
  31
+        def self.set(env, session)
  32
+          env[ENV_SESSION_KEY] = session
  33
+        end
  34
+
27 35
         def self.set_options(env, options)
28 36
           env[ENV_SESSION_OPTIONS_KEY] = options.dup
29 37
         end

0 notes on commit 49b2f25

Please sign in to comment.
Something went wrong with that request. Please try again.