1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Cache flash now

This commit is contained in:
Santiago Pastorino 2011-04-07 09:27:00 -03:00
parent 03d561ad77
commit 0e624ce9eb

View file

@ -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: