diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-06 23:25:19 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-06 23:25:19 +0000 |
commit | 98c02b96561ccb1c02158cba18990aa9d4d986fd (patch) | |
tree | 143a6b030eda246313cba5010bc6f30c0ca9480f /actionpack/lib | |
parent | 70039d1e912d61407f54813bbebc4f6a543569a7 (diff) | |
download | rails-98c02b96561ccb1c02158cba18990aa9d4d986fd.tar.gz rails-98c02b96561ccb1c02158cba18990aa9d4d986fd.tar.bz2 rails-98c02b96561ccb1c02158cba18990aa9d4d986fd.zip |
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
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/cookies.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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? |