instance method
stringify_key
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
stringify_key(key)
Flash keys are Symbols at nearly every call site. Symbol#name returns the interned frozen string where Symbol#to_s would allocate a new one.
Parameters
-
keyreq
Source
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 310
def stringify_key(key)
key.is_a?(Symbol) ? key.name : key.to_s
end
Defined in actionpack/lib/action_dispatch/middleware/flash.rb line 310
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Flash::FlashHash