new_connection() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

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

Register or log in to add new notes.