From a8dc9fd27b845193fd209a249e084f993a10c19d Mon Sep 17 00:00:00 2001 From: Jeffrey Hardy Date: Wed, 14 Oct 2009 00:26:53 -0400 Subject: CookieJar#delete should return the key's value, consistent with a Hash Signed-off-by: Jeremy Kemper --- actionpack/lib/action_controller/metal/cookies.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/metal') diff --git a/actionpack/lib/action_controller/metal/cookies.rb b/actionpack/lib/action_controller/metal/cookies.rb index d4806623c3..c328db8beb 100644 --- a/actionpack/lib/action_controller/metal/cookies.rb +++ b/actionpack/lib/action_controller/metal/cookies.rb @@ -87,8 +87,9 @@ module ActionController #:nodoc: def delete(key, options = {}) options.symbolize_keys! options[:path] = "/" unless options.has_key?(:path) - super(key.to_s) + value = super(key.to_s) @controller.response.delete_cookie(key, options) + value end end end -- cgit v1.2.3