Sha256: 6248952379175120bf13c16e23faf015a455d5dfc48646e12411d9d725f9d66a
Contents?: true
Size: 360 Bytes
Versions: 39
Compression:
Stored size: 360 Bytes
Contents
class ActiveRecord::Base mattr_accessor :shared_connection @@shared_connection = nil def self.connection @@shared_connection || retrieve_connection end end # Forces all threads to share the same connection. This works on # Capybara because it starts the web server in a thread. ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
Version data entries
39 entries across 39 versions & 1 rubygems