aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-01-17 23:38:14 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-17 23:38:14 +0000
commitcd3f14cf38750dd82132e2ba06033a945be20915 (patch)
tree4709c7d0b58efd3b7d39577e28d1958dd2380fba
parent6ca5eba396c17e4f9bb4e8e5eab37eb8725b7714 (diff)
downloadrails-cd3f14cf38750dd82132e2ba06033a945be20915.tar.gz
rails-cd3f14cf38750dd82132e2ba06033a945be20915.tar.bz2
rails-cd3f14cf38750dd82132e2ba06033a945be20915.zip
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
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_controller/cookies.rb2
2 files changed, 3 insertions, 1 deletions
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 @@ module ActionController #:nodoc:
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)