instance method
delete
Ruby on Rails 7.1.6
Since v3.1.12Signature
delete(key)
Immediately deletes the single flash entry. Use this method when you want remove the message within the current action. See also #discard.
Parameters
-
keyreq
Source
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 182
def delete(key)
key = key.to_s
@discard.delete key
@flashes.delete key
self
end
Defined in actionpack/lib/action_dispatch/middleware/flash.rb line 182
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Flash::FlashHash