Module: ActiveRecord::PGExtensions::Transaction

Defined in:
lib/active_record/pg_extensions/transaction.rb

Overview

Contains general additions to Transaction

Instance Method Summary collapse

Instance Method Details

#materialize!Object



27
28
29
30
31
32
33
34
# File 'lib/active_record/pg_extensions/transaction.rb', line 27

def materialize!
  PostgreSQLAdapter::TIMEOUTS.each do |kind|
    next if (timeout = send(kind, local: true)).nil?

    connection.set(kind, "#{(timeout * 1000).to_i}ms", local: true)
  end
  super
end