diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-02 11:01:29 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-02 11:01:29 -0300 |
commit | b1e4c5998e71b7c18fcca4636f1f50816dabc34e (patch) | |
tree | 8c73c67c8c3988622967e93e48202a9d4e4fc705 | |
parent | 5c87b5c5248154cf8aa76cce9a24a88769de022d (diff) | |
parent | 59ad995ff9e17a486d46bd0d3f83fac3f8a626eb (diff) | |
download | rails-b1e4c5998e71b7c18fcca4636f1f50816dabc34e.tar.gz rails-b1e4c5998e71b7c18fcca4636f1f50816dabc34e.tar.bz2 rails-b1e4c5998e71b7c18fcca4636f1f50816dabc34e.zip |
Merge pull request #16007 from nishantmodak/flash_msg_as_string
flash doesn't pass objects #15522 [ci skip]
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/flash.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index 4821d2a899..e90f8b9ce6 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -10,7 +10,7 @@ module ActionDispatch end end - # The flash provides a way to pass temporary objects between actions. Anything you place in the flash will be exposed + # The flash provides a way to pass temporary primitive-types (String, Array, Hash) between actions. Anything you place in the flash will be exposed # to the very next action and then cleared out. This is a great way of doing notices and alerts, such as a create # action that sets <tt>flash[:notice] = "Post successfully created"</tt> before redirecting to a display action that can # then expose the flash to its template. Actually, that exposure is automatically done. @@ -37,8 +37,11 @@ module ActionDispatch # flash.alert = "You must be logged in" # flash.notice = "Post successfully created" # - # This example just places a string in the flash, but you can put any object in there. And of course, you can put as - # many as you like at a time too. Just remember: They'll be gone by the time the next action has been performed. + # This example places a string in the flash. And of course, you can put as many as you like at a time too. If you want to pass + # non-primitive types, you will have to handle that in your application. Example: To show messages with links, you will have to + # use sanitize helper. + # + # Just remember: They'll be gone by the time the next action has been performed. # # See docs on the FlashHash class for more details about the flash. class Flash |