Skip to content
Browse files

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
  • Loading branch information...
1 parent 70039d1 commit 98c02b96561ccb1c02158cba18990aa9d4d986fd @dhh dhh committed Jan 6, 2005
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_controller/cookies.rb
View
6 actionpack/lib/action_controller/cookies.rb
@@ -51,16 +51,16 @@ def []=(name, options)
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?

0 comments on commit 98c02b9

Please sign in to comment.
Something went wrong with that request. Please try again.