aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-09-22 17:43:15 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-09-22 17:43:15 -0700
commit9f23ee0fdcdc1337e4b489e51053ee1e6037215b (patch)
tree9f0ec1286f965e8ca0ebf7b49b3bbdc59f2b2eb8
parenta9f28600e901b11a9222e34bfae8642bfb753186 (diff)
downloadrails-9f23ee0fdcdc1337e4b489e51053ee1e6037215b.tar.gz
rails-9f23ee0fdcdc1337e4b489e51053ee1e6037215b.tar.bz2
rails-9f23ee0fdcdc1337e4b489e51053ee1e6037215b.zip
ask the request object for the session
The flash middleware shouldn't know how to look up the session object. Just ask the request for that information.
-rw-r--r--actionpack/lib/action_dispatch/middleware/flash.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb
index c482b1c5e7..014b7bee61 100644
--- a/actionpack/lib/action_dispatch/middleware/flash.rb
+++ b/actionpack/lib/action_dispatch/middleware/flash.rb
@@ -276,7 +276,7 @@ module ActionDispatch
req = ActionDispatch::Request.new env
@app.call(env)
ensure
- session = Request::Session.find(req) || {}
+ session = req.session || {}
flash_hash = req.flash_hash
if flash_hash && (flash_hash.present? || session.key?('flash'))