Skip to content
This repository
Browse code

create a request::session object in the memecache store middleware

  • Loading branch information...
commit 638d0020a2ad92993cb9c7385ad7584618c7af1c 1 parent b13849d
Aaron Patterson authored May 04, 2012
10  actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb
@@ -12,6 +12,16 @@ def initialize(app, options = {})
12 12
         options[:expire_after] ||= options[:expires]
13 13
         super
14 14
       end
  15
+
  16
+      private
  17
+
  18
+      def prepare_session(env)
  19
+        Request::Session.create(self, env, @default_options)
  20
+      end
  21
+
  22
+      def loaded_session?(session)
  23
+        !session.is_a?(Request::Session) || session.loaded?
  24
+      end
15 25
     end
16 26
   end
17 27
 end

0 notes on commit 638d002

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