method
new_connection
new_connection()
private
Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 303 def new_connection connection = ActiveRecord::Base.send(spec.adapter_method, spec.config) # TODO: This is a bit icky, and in the long term we may want to change the method # signature for connections. Also, if we switch to have one visitor per # connection (and therefore per thread), we can get rid of the thread-local # variable in Arel::Visitors::ToSql. @visitor ||= connection.class.visitor_for(self) connection.visitor = @visitor connection end