diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-04 10:57:55 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-04 10:57:55 -0700 |
commit | 638d0020a2ad92993cb9c7385ad7584618c7af1c (patch) | |
tree | 023a9381b254f63ba4c5d90f3d3f4a857c2eeb84 /actionpack/lib/action_dispatch | |
parent | b13849de88cb330aaedee0881862ea55bfa33c85 (diff) | |
download | rails-638d0020a2ad92993cb9c7385ad7584618c7af1c.tar.gz rails-638d0020a2ad92993cb9c7385ad7584618c7af1c.tar.bz2 rails-638d0020a2ad92993cb9c7385ad7584618c7af1c.zip |
create a request::session object in the memecache store middleware
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb index 4dd9a946c2..c51cbddfb5 100644 --- a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb @@ -12,6 +12,16 @@ module ActionDispatch options[:expire_after] ||= options[:expires] super end + + private + + def prepare_session(env) + Request::Session.create(self, env, @default_options) + end + + def loaded_session?(session) + !session.is_a?(Request::Session) || session.loaded? + end end end end |