active?() Ver: 1.0.0
From: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter Version 1.0.0
Comments

Is this connection alive and ready for queries?

Sourcecode
# File src/rails-1.0.0/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 59
      def active?
        if @connection.respond_to?(:status)
          @connection.status == PGconn::CONNECTION_OK
        else
          @connection.query 'SELECT 1'
          true
        end
      rescue PGError
        false
      end
Add New Note User Added Notes