From e2218b7ee5df4580df8d502cbe4ef47b4f1c4a8c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 4 May 2012 11:03:37 -0700 Subject: create a request session in the cookie stores --- actionpack/lib/action_dispatch/middleware/session/cookie_store.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb index a4866f5a8f..8d673dd95e 100644 --- a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb @@ -46,6 +46,14 @@ module ActionDispatch 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 + def unpacked_cookie_data(env) env["action_dispatch.request.unsigned_session_cookie"] ||= begin stale_session_check! do -- cgit v1.2.3