public Method

CookieJar.delete(name, options = {})

Removes the cookie on the client machine by setting the value to an empty string and setting its expiration date into the past. Like []=, you can pass in an options hash to delete cookies with extra data such as a path.

Source Code

# File action_controller/cookies.rb, line 71
def delete(name, options = {})
  options.stringify_keys!
  set_cookie(options.merge("name" => name.to_s, "value" => "", "expires" => Time.at(0)))
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.