aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-04-07 09:27:00 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-04-07 09:27:00 -0300
commit0e624ce9eb9056c8986621f3e6b7f5ca67b4cb12 (patch)
treeeb16141ff0c8e34dec5345b09a8f55bbe4923a7e /actionpack
parent03d561ad77085f17ba816ebec619a3d359b2164e (diff)
downloadrails-0e624ce9eb9056c8986621f3e6b7f5ca67b4cb12.tar.gz
rails-0e624ce9eb9056c8986621f3e6b7f5ca67b4cb12.tar.bz2
rails-0e624ce9eb9056c8986621f3e6b7f5ca67b4cb12.zip
Cache flash now
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/flash.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb
index 6eda1f31a7..0af86e4df9 100644
--- a/actionpack/lib/action_dispatch/middleware/flash.rb
+++ b/actionpack/lib/action_dispatch/middleware/flash.rb
@@ -112,7 +112,7 @@ module ActionDispatch
#
# Entries set via <tt>now</tt> are accessed the same way as standard entries: <tt>flash['my-key']</tt>.
def now
- FlashNow.new(self)
+ @now ||= FlashNow.new(self)
end
# Keeps either the entire current flash or a specific flash entry available for the next action: