From a668beffd64106a1e1fedb71cc25eaaa11baf0c1 Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Sun, 9 Feb 2014 00:35:10 -0500 Subject: [PATCH] Stringify the incoming hash in FlashHash Stringify the incoming as well to handle incoming symbol keys from marshalled sessions --- actionpack/lib/action_dispatch/middleware/flash.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index 419bcb8a73..1e45a38e5f 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/hash/keys' + module ActionDispatch class Request < Rack::Request # Access the contents of the flash. Use flash["notice"] to @@ -94,7 +96,7 @@ def to_session_value def initialize(flashes = {}, discard = []) #:nodoc: @discard = Set.new(stringify_array(discard)) - @flashes = flashes + @flashes = flashes.stringify_keys @now = nil end -- GitLab