This project is archived and is in readonly mode.

#1801 ✓resolved
gaffo

TestSession and AbstractStore delete and update methods do not match in parameter count

Reported by gaffo | January 26th, 2009 @ 11:51 PM

Now that we have moved to AbstractStore for rails (non cookie) sessions, the delete and update methods for the test session also exist in the Session via it's subclassing of Hash, but they take different parameter counts.

When in test mode, the delete and update methods without parameters will work fine, but calling those on a SessionHash now give you wrong parameter count 0 for 1. Using the syntax that SessionHash expects gives you a missing parameters 1 for 0 when running tests.

I would propose the following steps: 1) Create save_test_session and clear_test_session functions that implement the current functionality in test_session 2) When delete or update are called without parameters, issue a deprecation warning and tell users to use methods in #1. 3) When the users calls update or delete with parameters, pass them onto calls on @attributes.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages