Sha256: e36f1ffccfd7caf1795f15fdc3a1ee1bf68aacd23ecd17cccebfe0fa6c17f10b
Contents?: true
Size: 362 Bytes
Versions: 15
Compression:
Stored size: 362 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
15 entries across 15 versions & 1 rubygems