Skip to content

Instantly share code, notes, and snippets.

@ktopping
Created May 27, 2013 14:51
Show Gist options
  • Save ktopping/5657474 to your computer and use it in GitHub Desktop.
Save ktopping/5657474 to your computer and use it in GitHub Desktop.
module ActiveRecord
module ConnectionAdapters
class PostgreSQLAdapter < AbstractAdapter
class StatementPool < ConnectionAdapters::StatementPool
def connection_active?
@connection.query 'SELECT 1'
true
rescue PGError
false
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment