Skip to content
Browse files

Cache flash now

  • Loading branch information...
1 parent 03d561a commit 0e624ce9eb9056c8986621f3e6b7f5ca67b4cb12 @spastorino spastorino committed Apr 7, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/middleware/flash.rb
View
2 actionpack/lib/action_dispatch/middleware/flash.rb
@@ -112,7 +112,7 @@ def replace(h) #:nodoc:
#
# 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:

0 comments on commit 0e624ce

Please sign in to comment.
Something went wrong with that request. Please try again.