Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/splinter/perf/shared_connection.rb

Overview

This is a hack that forces AR to share its connection between different threads. Useful for Capybara when you are not using rack-test.

Constant Summary collapse

@@shared_connection =
nil

Class Method Summary collapse

Class Method Details

.connectionObject



7
8
9
# File 'lib/splinter/perf/shared_connection.rb', line 7

def self.connection
  @@shared_connection || retrieve_connection
end