{"issue":{"milestone":null,"user":{"id":12543,"login":"emassip","url":"https://api.github.com/users/emassip","avatar_url":"https://secure.gravatar.com/avatar/0ac3cc59b478d576dc720c7997c5461d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"0ac3cc59b478d576dc720c7997c5461d"},"title":"NoMethodError when deleting cookies from Rails with Rack 1.3","created_at":"2011-12-19T10:28:48Z","labels":[],"updated_at":"2011-12-19T10:47:21Z","state":"open","id":2598692,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/rack/rack/issues/291","closed_at":null,"body":"I don't know if this can be considered as a Rails issue or a Rack one, but as it worked in previous versions of Rack, that's where it'll be reported.\r\n\r\nRight now with Rack 1.3 we can not use Rails's `cookies[:my_cookie_key]` anymore:\r\n\r\n\r\n```\r\nNoMethodError in AccountController#logout\r\n\r\nprivate method `gsub' called for :autologin:Symbol\r\nRAILS_ROOT: /usr/share/redmine\r\n\r\nApplication Trace | Framework Trace | Full Trace\r\n/usr/lib/ruby/vendor_ruby/rack/backports/uri/common.rb:24:in `encode_www_form_component'\r\n/usr/lib/ruby/vendor_ruby/rack/utils.rb:23:in `escape'\r\n/usr/lib/ruby/vendor_ruby/rack/utils.rb:201:in `set_cookie_header!'\r\n/usr/lib/ruby/vendor_ruby/rack/utils.rb:238:in `delete_cookie_header!'\r\n/usr/lib/ruby/vendor_ruby/rack/response.rb:63:in `delete_cookie'\r\n/usr/lib/ruby/vendor_ruby/action_controller/cookies.rb:94:in `delete'\r\n```\r\n\r\nRack 1.1.1 Utils#escape:\r\n\r\n```ruby\r\ndef escape(s)\r\n  s.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/n) {\r\n    '%'+$1.unpack('H2'*bytesize($1)).join('%').upcase\r\n  }.tr(' ', '+')\r\nend\r\n```\r\n\r\nRack 1.3.1 Utils#escape:\r\n\r\n```ruby\r\ndef escape(s)\r\n  URI.encode_www_form_component(s)\r\nend\r\n```\r\n\r\nPlease note that the  `to_s ` has been crushed.\r\n\r\nUsing `cookies['my_cookie_key']` works but is not Rails way.\r\n\r\nI don't understand why I can't find any related issues reported, I must be missing something??\r\n","number":291,"url":"https://api.github.com/repos/rack/rack/issues/291","comments":1,"assignee":null},"comment":{"user":{"id":12543,"login":"emassip","url":"https://api.github.com/users/emassip","avatar_url":"https://secure.gravatar.com/avatar/0ac3cc59b478d576dc720c7997c5461d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"0ac3cc59b478d576dc720c7997c5461d"},"created_at":"2011-12-19T10:47:21Z","updated_at":"2011-12-19T10:47:21Z","id":3201699,"body":"Crushed by f0beb34b0fa5a50856e04a996dcbd822362a1a5b.","url":"https://api.github.com/repos/rack/rack/issues/comments/3201699"},"action":"created"}