diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-17 07:18:39 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-17 07:18:39 +0000 |
commit | 6acda705dcee10cb31aae5ab8f6442f8006e4b37 (patch) | |
tree | 2260ec2bc6582aab69b0b36c9d6b3ee62bb1195a | |
parent | ed46cc3058ac9406f61220c9720c51f4edd172f9 (diff) | |
download | rails-6acda705dcee10cb31aae5ab8f6442f8006e4b37.tar.gz rails-6acda705dcee10cb31aae5ab8f6442f8006e4b37.tar.bz2 rails-6acda705dcee10cb31aae5ab8f6442f8006e4b37.zip |
Added that deleting a cookie should not just set it to an empty string but also instantly expire it #1118 [todd@robotcoop.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/cookies.rb | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index c73aa707bc..5b413108c1 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added that deleting a cookie should not just set it to an empty string but also instantly expire it #1118 [todd@robotcoop.com] + * Added AssetTagHelper#image_path, AssetTagHelper#javascript_path, and AssetTagHelper#stylesheet_path #1110 [Larry Halff] * Fixed url_for(nil) in functional tests #1116 [Alisdair McDiarmid] diff --git a/actionpack/lib/action_controller/cookies.rb b/actionpack/lib/action_controller/cookies.rb index b82aa5ee08..81f176ad32 100644 --- a/actionpack/lib/action_controller/cookies.rb +++ b/actionpack/lib/action_controller/cookies.rb @@ -54,9 +54,10 @@ module ActionController #:nodoc: set_cookie(options) end - # Removes the cookie on the client machine by setting the value to an empty string. + # Removes the cookie on the client machine by setting the value to an empty string + # and setting its expiration date into the past def delete(name) - set_cookie("name" => name.to_s, "value" => "") + set_cookie("name" => name.to_s, "value" => "", "expires" => Time.at(0)) end private |