diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/cookies.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/cookies.rb b/actionpack/lib/action_controller/cookies.rb index d56096818d..b23bb74f88 100644 --- a/actionpack/lib/action_controller/cookies.rb +++ b/actionpack/lib/action_controller/cookies.rb @@ -36,13 +36,13 @@ module ActionController #:nodoc: # Returns the value of the cookie by +name+ -- or nil if no such cookie exist. You set new cookies using either the cookie method # or cookies[]= (for simple name/value cookies without options). def [](name) - @cookies[name].value if @cookies[name] + @cookies[name.to_s].value if @cookies[name.to_s] end def []=(name, options) if options.is_a?(Hash) options.each { |key, value| options[key.to_s] = value } - options["name"] = name + options["name"] = name.to_s else options = [ name, options ] end |