bmabey/database_cleaner — pull request #197 by davebrace (2013-03-30 14:34:53+00:00)
Title: Remove attempt to establish connections with anonymous classes in ActiveRecord.

I ran into this issue when trying to upgrade a project to Rails 4. ActiveRecord 4 no longer allows establishing connections with the use of anonymous classes:

https://github.com/rails/rails/issues/8934

I believe my attached commits should fix this issue by calling establish_connection directly on ActiveRecord::Base instead of through an anonymous class.