Improve documentation of PingController

This commit is contained in:
Sebastian Serth
2021-12-06 17:38:19 +01:00
parent b2f1c44eac
commit 3f9425277f

View File

@ -15,8 +15,9 @@ class PingController < ApplicationController
private
def postgres_connected!
# any unhandled exception leads to a HTTP 500 response.
ApplicationRecord.establish_connection
ApplicationRecord.connection
ApplicationRecord.connected?
raise ActiveRecord::ConnectionNotEstablished unless ApplicationRecord.connected?
end
end