Method: ActionDispatch::Flash::FlashHash#delete

Defined in:
actionpack/lib/action_dispatch/middleware/flash.rb

#delete(key) ⇒ Object

Immediately deletes the single flash entry. Use this method when you want remove the message within the current action. See also #discard.



189
190
191
192
193
194
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 189

def delete(key)
  key = key.to_s
  @discard.delete key
  @flashes.delete key
  self
end