Method: ActionDispatch::Flash::FlashHash#sweep

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

#sweepObject

Mark for removal entries that were kept, and delete unkept ones.

This method is called automatically by filters, so you generally don’t need to care about it.



274
275
276
277
# File 'actionpack/lib/action_dispatch/middleware/flash.rb', line 274

def sweep # :nodoc:
  @discard.each { |k| @flashes.delete k }
  @discard.replace @flashes.keys
end