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.
Source Code
# File action_controller/flash.rb, line 109 def sweep #:nodoc: keys.each do |k| unless @used[k] use(k) else delete(k) @used.delete(k) end end # clean up after keys that could have been left over by calling reject! or shift on the flash (@used.keys - keys).each{ |k| @used.delete(k) } end
<code/>and<pre/>for code samples.