def retrieve_connection(klass) #:nodoc:
      self.ensure_ready
      pool = self.retrieve_connection_pool(klass)
      (pool && pool.connection) or raise ActiveRecord::ConnectionNotEstablished
    end
def retrieve_connection(klass) #:nodoc:
      self.ensure_ready
      pool = self.retrieve_connection_pool(klass)
      (pool && pool.connection) or raise ActiveRecord::ConnectionNotEstablished
    end
Locate the connection of the nearest super class. This can be an
 active or defined connection: if it is the latter, it will be
 opened and set as the active connection for the class it was defined
 for (not necessarily the current class).