Skip to content

Commit a668bef

Browse files
guilleiguaranchancancode
authored andcommitted
Stringify the incoming hash in FlashHash
Stringify the incoming as well to handle incoming symbol keys from marshalled sessions
1 parent a6ce984 commit a668bef

File tree

1 file changed

+3
-1
lines changed
  • actionpack/lib/action_dispatch/middleware

1 file changed

+3
-1
lines changed

actionpack/lib/action_dispatch/middleware/flash.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'active_support/core_ext/hash/keys'
2+
13
module ActionDispatch
24
class Request < Rack::Request
35
# Access the contents of the flash. Use <tt>flash["notice"]</tt> to
@@ -94,7 +96,7 @@ def to_session_value
9496

9597
def initialize(flashes = {}, discard = []) #:nodoc:
9698
@discard = Set.new(stringify_array(discard))
97-
@flashes = flashes
99+
@flashes = flashes.stringify_keys
98100
@now = nil
99101
end
100102

0 commit comments

Comments
 (0)