aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/request
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-09-01 23:42:39 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-09-01 23:42:39 -0700
commitabd47c15b870ea3cdbe610a02df03e9425870417 (patch)
treeec0156814aeaa7f5dbec041af5955467d7ffc73d /actionpack/lib/action_dispatch/request
parenta6674991037fc360c7a72e7c28eec448f0231a3e (diff)
parent8bfcb0de3a2599925ce714cddc49d608ff8e03a8 (diff)
downloadrails-abd47c15b870ea3cdbe610a02df03e9425870417.tar.gz
rails-abd47c15b870ea3cdbe610a02df03e9425870417.tar.bz2
rails-abd47c15b870ea3cdbe610a02df03e9425870417.zip
Merge pull request #7495 from steveklabnik/issue_7478
Properly reset the session on reset_session
Diffstat (limited to 'actionpack/lib/action_dispatch/request')
-rw-r--r--actionpack/lib/action_dispatch/request/session.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/request/session.rb b/actionpack/lib/action_dispatch/request/session.rb
index 35d694b4a1..a05a23d953 100644
--- a/actionpack/lib/action_dispatch/request/session.rb
+++ b/actionpack/lib/action_dispatch/request/session.rb
@@ -70,9 +70,12 @@ module ActionDispatch
def destroy
clear
options = self.options || {}
- @by.send(:destroy_session, @env, options[:id], options)
- options[:id] = nil
+ new_sid = @by.send(:destroy_session, @env, options[:id], options)
+ options[:id] = new_sid # Reset session id with a new value or nil
+
+ # Load the new sid to be written with the response
@loaded = false
+ load_for_write!
end
def [](key)