Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/panda/core/testing/support/system/database_connection_helpers.rb

Overview

Share database connection between test thread and server thread This allows the Puma server to see uncommitted transaction data from fixtures

Direct Known Subclasses

Panda::Core::ApplicationRecord

Constant Summary collapse

@@shared_connection =
nil

Class Method Summary collapse

Class Method Details

.connectionObject



9
10
11
# File 'lib/panda/core/testing/support/system/database_connection_helpers.rb', line 9

def self.connection
  @@shared_connection || retrieve_connection
end