All the methods in ActiveRecord::SessionStore::SqlBypass use
@@connection class var, instead of the homonym class method. This of
course doesn't not guarantee that var isn't nil.
Try it by yourself:
ActionController::Base.session_store = :active_record_store
Then try to start the server and use sessions, it should raise a
I created a patch for solving this issue, but not the whole problem.
Since there aren't unit tests for `ActiveRecord` session stores, but
only functional tests in `ActionPack`.
As you can see from the patch I replaced `@@connection` with
`connection` only where covered by tests.
LH Ticket: http://bit.ly/FGiaD