aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/cookies.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/cookies.rb')
-rw-r--r--actionpack/lib/action_controller/cookies.rb5
1 files changed, 3 insertions, 2 deletions
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