chore(rubocop): fix Rails/RootPathnameMethods and assimiled cops

This commit is contained in:
Colin Darie 2023-04-19 10:55:16 +02:00
parent 6a3fd8fc4d
commit b273e7b67e
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
8 changed files with 19 additions and 8 deletions

View file

@ -1,7 +1,7 @@
class PingController < ApplicationController
def index
Rails.logger.silence do
status_code = if File.file?(Rails.root.join("maintenance"))
status_code = if Rails.root.join("maintenance").file?
# See https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#4.2-http-check%20disable-on-404
:not_found
elsif (ActiveRecord::Base.connection.execute('select 1 as test;').first['test'] == 1)