private Method

FlashHash.use(k=nil, v=true)

Used internally by the keep and discard methods

use()               # marks the entire flash as used
use('msg')          # marks the "msg" entry as used
use(nil, false)     # marks the entire flash as unused (keeps it around for one more action)
use('msg', false)   # marks the "msg" entry as unused (keeps it around for one more action)

Source Code

# File action_controller/flash.rb, line 129
def use(k=nil, v=true)
  unless k.nil?
    @used[k] = v
  else
    keys.each{ |key| use(key, v) }
  end
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.