Sha256: 0d9f5227e07b4ebeda9441b034a6a5882e7f9ff232e67a83e5b44eaa421fb674
Contents?: true
Size: 361 Bytes
Versions: 8
Compression:
Stored size: 361 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
8 entries across 8 versions & 2 rubygems