vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
# Remove the connection for this class. This will close the active
# connection and the defined connection (if they exist). The result
# can be used as an argument for establish_connection, for easily
# re-establishing the connection.
Remove the connection for this class. This will close the active
connection and the defined connection (if they exist). The result
can be used as an argument for establish_connection, for easily
re-establishing the connection.
Remove the connection for this class . This will close the active connection and the defined connection ( if they exist ) . The result can be used as an argument for establish_connection for easily re - establishing the connection .
def remove_connection(klass)
        pool = @connection_pools[klass.name]
        @connection_pools.delete_if { |key, value| value == pool }
        pool.disconnect! if pool
        pool.spec.config if pool
      end
def remove_connection ( klass ) pool = @connection_pools [ klass . name ] @connection_pools . delete_if { | key , value | value == pool } pool . disconnect! if pool pool . spec . config if pool end
Remove the connection for this class.
Remove the connection for this class .
klass