]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Fix new rubocop warnings
[rails.git] / app / controllers / site_controller.rb
index 58f0a11c9340bbd796082622f3d6dcdbe852d13d..9adbaa1953fd9fe774bf9bb90eb130da53aed90e 100644 (file)
@@ -24,7 +24,7 @@ class SiteController < ApplicationController
   end
 
   def index
-    session[:location] ||= OSM.ip_location(request.env["REMOTE_ADDR"]) unless Settings.status == "database_readonly" || Settings.status == "database_offline"
+    session[:location] ||= OSM.ip_location(request.env["REMOTE_ADDR"]) unless %w[database_readonly database_offline].include?(Settings.status)
   end
 
   def permalink