Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9937 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Cookies should return an array when set as an array

Reported by: queso Assigned to: core
Priority: high Milestone: 2.0
Component: ActionPack Version: edge
Severity: major Keywords: cookies
Cc:

Description

For some unknown reason, someone used @cookies[name.to_s].value.first in the CookieJar [] method, which only returned the first value if you had set a whole array - which the documents claim you can do, and the rest of cookies seem to support.

I added a test which proved the failure and then applied the fix. Both are included in the patch.

Attachments

making_cookies_return_an_array_if_you_gave_it_an_array.diff (1.7 kB) - added by queso on 10/20/07 16:10:46.

Change History

10/20/07 16:10:46 changed by queso

  • attachment making_cookies_return_an_array_if_you_gave_it_an_array.diff added.

10/20/07 17:30:05 changed by rick

  • status changed from new to closed.
  • resolution set to fixed.

(In [7978]) Ensure that cookies handle array values correctly. Closes #9937 [queso]