From 98c02b96561ccb1c02158cba18990aa9d4d986fd Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 6 Jan 2005 23:25:19 +0000 Subject: Simplified the set_cookie method and made it indifferent to symbol or string as name git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@343 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/cookies.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_controller/cookies.rb') diff --git a/actionpack/lib/action_controller/cookies.rb b/actionpack/lib/action_controller/cookies.rb index 76ca12e913..c128e0e1a0 100644 --- a/actionpack/lib/action_controller/cookies.rb +++ b/actionpack/lib/action_controller/cookies.rb @@ -51,16 +51,16 @@ module ActionController #:nodoc: options = { "name" => name, "value" => options } end - set_cookie(name, options) + set_cookie(options) end # Removes the cookie on the client machine by setting the value to an empty string. def delete(name) - set_cookie(name, "name" => name, "value" => "") + set_cookie("name" => name.to_s, "value" => "") end private - def set_cookie(name, options) #:doc: + def set_cookie(options) #:doc: options["path"] = "/" unless options["path"] cookie = CGI::Cookie.new(options) @controller.logger.info "Cookie set: #{cookie}" unless @controller.logger.nil? -- cgit v1.2.3