Class: ActiveRecord::Bogacs::ConnectionHandler

Inherits:
ConnectionAdapters::ConnectionHandler show all
Defined in:
lib/active_record/bogacs/connection_handler.rb

Instance Method Summary collapse

Methods inherited from ConnectionAdapters::ConnectionHandler

#connection_pool_class, connection_pool_class=

Instance Method Details

#establish_connection(config) ⇒ Object

(spec) in 5.0



22
23
24
25
26
27
28
29
# File 'lib/active_record/bogacs/connection_handler.rb', line 22

def establish_connection(owner, spec)
  @class_to_pool.clear
  if spec.config[:pool].eql? false
    owner_to_pool[owner.name] = ActiveRecord::Bogacs::FalsePool.new(spec)
  else # super
    owner_to_pool[owner.name] = ActiveRecord::ConnectionAdapters::ConnectionPool.new(spec)
  end
end