From cd3f14cf38750dd82132e2ba06033a945be20915 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 17 Jan 2005 23:38:14 +0000 Subject: [PATCH] Fixed a bug where cookies wouldn't be set if a symbol was used instead of a string as the key git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@453 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/cookies.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 68e3c5dd6d..934538fcee 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed a bug where cookies wouldn't be set if a symbol was used instead of a string as the key + * Added assert_cookie_equal to assert the contents of a named cookie * Fixed bug in page caching that prevented it from working at all diff --git a/actionpack/lib/action_controller/cookies.rb b/actionpack/lib/action_controller/cookies.rb index c128e0e1a0..0a45684f6b 100644 --- a/actionpack/lib/action_controller/cookies.rb +++ b/actionpack/lib/action_controller/cookies.rb @@ -48,7 +48,7 @@ def []=(name, options) options = options.inject({}) { |options, pair| options[pair.first.to_s] = pair.last; options } options["name"] = name.to_s else - options = { "name" => name, "value" => options } + options = { "name" => name.to_s, "value" => options } end set_cookie(options) -- GitLab