module ActiveRecord::SharedConnection

Public Class Methods

with_shared_connection(model = ActiveRecord::Base, &block) click to toggle source
# File lib/active_record/shared_connection.rb, line 11
def self.with_shared_connection(model = ActiveRecord::Base, &block)
  model.connection_pool.with_shared_connection(&block)
end

Public Instance Methods

with_shared_connection(&block) click to toggle source
# File lib/active_record/shared_connection.rb, line 4
def with_shared_connection(&block)
  ActiveRecord::SharedConnection.with_shared_connection(self.class, &block)
end