提交 9f23ee0f 编写于 作者: A Aaron Patterson

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.
上级 a9f28600
......@@ -276,7 +276,7 @@ def call(env)
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'))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册