Module: TransactionIsolation

Defined in:
lib/transaction_isolation.rb,
lib/transaction_isolation/version.rb,
lib/transaction_isolation/active_record/base.rb,
lib/transaction_isolation/active_record/connection_adapters/mysql2_adapter.rb,
lib/transaction_isolation/active_record/connection_adapters/sqlite3_adapter.rb,
lib/transaction_isolation/active_record/connection_adapters/abstract_adapter.rb,
lib/transaction_isolation/active_record/connection_adapters/postgresql_adapter.rb

Defined Under Namespace

Modules: ActiveRecord Classes: Railtie

Constant Summary collapse

VERSION =
"2.0.0"

Class Method Summary collapse

Class Method Details

.apply_activerecord_patchObject

Must be called after ActiveRecord established a connection. Only then we know which connection adapter is actually loaded and can be enhanced. Please note ActiveRecord does not load unused adapters.



9
10
11
12
13
14
15
16
# File 'lib/transaction_isolation.rb', line 9

def self.apply_activerecord_patch
  require_relative 'transaction_isolation/active_record/errors'
  require_relative 'transaction_isolation/active_record/base'
  require_relative 'transaction_isolation/active_record/connection_adapters/abstract_adapter'
  require_relative 'transaction_isolation/active_record/connection_adapters/mysql2_adapter'
  require_relative 'transaction_isolation/active_record/connection_adapters/postgresql_adapter'
  require_relative 'transaction_isolation/active_record/connection_adapters/sqlite3_adapter'
end