fix "Mysql2::Error: This connection is in use by" in spec for Rails 4

Conflicts:
	Gemfile
	Gemfile.lock
This commit is contained in:
wvengen 2013-12-07 15:10:13 +01:00
parent 2de4a2a3a0
commit e88810e4a7
3 changed files with 4 additions and 1 deletions

View file

@ -5,7 +5,7 @@ class ActiveRecord::Base
@@shared_connection = nil
def self.connection
@@shared_connection || retrieve_connection
@@shared_connection || ConnectionPool::Wrapper.new(:size => 1) { retrieve_connection }
end
end
# Forces all threads to share the same connection. This works on