Sha256: a98fb85ce5457fbac9a3a90a3eb309ce39e30933d2c448f8ed39e17cb3fea492
Contents?: true
Size: 291 Bytes
Versions: 2
Compression:
Stored size: 291 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.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
adminpanel-2.1.1 | spec/support/shared_connection.rb |
adminpanel-2.1.0 | spec/support/shared_connection.rb |