method
establish_connection
establish_connection(config)
public
Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 1042 def establish_connection(config) resolver = ConnectionSpecification::Resolver.new(Base.configurations) spec = resolver.spec(config) remove_connection(spec.name) message_bus = ActiveSupport::Notifications.instrumenter payload = { connection_id: object_id } if spec payload[:spec_name] = spec.name payload[:config] = spec.config end message_bus.instrument("!connection.active_record", payload) do owner_to_pool[spec.name] = ConnectionAdapters::ConnectionPool.new(spec) end owner_to_pool[spec.name] end