diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-30 09:36:08 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-30 09:36:08 -0500 |
commit | a1140a10318a79b5dace11679f654c33f477ef57 (patch) | |
tree | 6bc8c1c8d243bd36bf4be633c389bf1f6b35e9db /actionpack/lib/action_dispatch/middleware | |
parent | 54984f0f245cd67999c23112dfa841a4d0bd66f2 (diff) | |
download | rails-a1140a10318a79b5dace11679f654c33f477ef57.tar.gz rails-a1140a10318a79b5dace11679f654c33f477ef57.tar.bz2 rails-a1140a10318a79b5dace11679f654c33f477ef57.zip |
Revert "Only save the session if we're actually writing to it [#2703 state:resolved]"
This reverts commit dd98280e38d640f5724887cf8a715b79f0439d2d.
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/session/abstract_store.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb index 6d109f4624..03761b10bd 100644 --- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb @@ -15,7 +15,6 @@ module ActionDispatch @by = by @env = env @loaded = false - @updated = false end def session_id @@ -33,7 +32,6 @@ module ActionDispatch def []=(key, value) load! unless @loaded super(key.to_s, value) - @updated = true end def to_hash @@ -81,10 +79,6 @@ module ActionDispatch @loaded end - def updated? - @updated - end - def load! stale_session_check! do id, session = @by.send(:load_session, @env) @@ -153,10 +147,7 @@ module ActionDispatch options = env[ENV_SESSION_OPTIONS_KEY] if !session_data.is_a?(AbstractStore::SessionHash) || session_data.send(:loaded?) || options[:expire_after] - if session_data.is_a?(AbstractStore::SessionHash) - session_data.send(:load!) if !session_data.send(:loaded?) - return response if !session_data.send(:updated?) - end + session_data.send(:load!) if session_data.is_a?(AbstractStore::SessionHash) && !session_data.send(:loaded?) sid = options[:id] || generate_sid |