class ActionDispatch::Flash::FlashHash

def delete(key)

remove the message within the current action. See also #discard.
Immediately deletes the single flash entry. Use this method when you want
def delete(key)
  key = key.to_s
  @discard.delete key
  @flashes.delete key
  self
end