From 9f23ee0fdcdc1337e4b489e51053ee1e6037215b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 22 Sep 2015 17:43:15 -0700 Subject: [PATCH] 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. --- actionpack/lib/action_dispatch/middleware/flash.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ 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')) -- GitLab