From 0e624ce9eb9056c8986621f3e6b7f5ca67b4cb12 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 7 Apr 2011 09:27:00 -0300 Subject: Cache flash now --- actionpack/lib/action_dispatch/middleware/flash.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/middleware/flash.rb') 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 now are accessed the same way as standard entries: flash['my-key']. 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: -- cgit v1.2.3