public Method

FlashHash.sweep(

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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.