Silent logs of ping rendering

This commit is contained in:
Guillaume Lazzara 2016-07-06 10:06:28 +02:00 committed by Xavier J
parent f3f5ef8c3b
commit b338fe0efc

View file

@ -1,10 +1,12 @@
class PingController < ApplicationController class PingController < ApplicationController
def index def index
if (ActiveRecord::Base.connected?) Rails.logger.silence do
render nothing: true, status: 200, content_type: "application/json" if (ActiveRecord::Base.connected?)
else render nothing: true, status: 200, content_type: "application/json"
render nothing: true, status: 500, content_type: "application/json" else
render nothing: true, status: 500, content_type: "application/json"
end
end end
end end