aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorNishant Modak <modak.nishant@gmail.com>2014-07-01 23:06:13 +0530
committerNishant Modak <modak.nishant@gmail.com>2014-07-01 23:26:14 +0530
commit59ad995ff9e17a486d46bd0d3f83fac3f8a626eb (patch)
tree9bbc34a17b81163cebd05dc5983028aaf4cfa4d3 /actionpack
parent7bd62061601ec53c1d79ed9639ed64a93ea4e043 (diff)
downloadrails-59ad995ff9e17a486d46bd0d3f83fac3f8a626eb.tar.gz
rails-59ad995ff9e17a486d46bd0d3f83fac3f8a626eb.tar.bz2
rails-59ad995ff9e17a486d46bd0d3f83fac3f8a626eb.zip
flash doesn't pass objects #15522 [ci skip]
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/flash.rb9
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