mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
a9f28600e9
commit
9f23ee0fdc
1 changed files with 1 additions and 1 deletions
|
@ -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'))
|
||||
|
|
Loading…
Reference in a new issue