class ActionDispatch::Flash::FlashHash
def keep(k = nil)
flash.keep # keeps the entire flash
Keeps either the entire current flash or a specific flash entry available for the next action:
def keep(k = nil) k = k.to_s if k @discard.subtract Array(k || keys) k ? self[k] : self end