Improve documentation of PingController
This commit is contained in:
@ -15,8 +15,9 @@ class PingController < ApplicationController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def postgres_connected!
|
def postgres_connected!
|
||||||
|
# any unhandled exception leads to a HTTP 500 response.
|
||||||
ApplicationRecord.establish_connection
|
ApplicationRecord.establish_connection
|
||||||
ApplicationRecord.connection
|
ApplicationRecord.connection
|
||||||
ApplicationRecord.connected?
|
raise ActiveRecord::ConnectionNotEstablished unless ApplicationRecord.connected?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user