Keeps either the entire current flash or a specific flash entry available
for the next action:
flash.keep# keeps the entire flashflash.keep(:notice)# keeps only the "notice" entry, the rest of the flash is discarded
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 237
def keep(k = nil)
k = k.to_s if k
@discard.subtract Array(k || keys)
k ? self[k] : self
end