]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Bump eslint from 8.56.0 to 8.57.0
[rails.git] / app / controllers / application_controller.rb
index a30816a8ede740eaf3adf8f8be7165db0d23a193..0a7df0994c9fc23f5c452ed2bb62dfc291b88aa6 100644 (file)
@@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base
 
   def authorize_web
     if session[:user]
-      self.current_user = User.where(:id => session[:user], :status => %w[active confirmed suspended]).first
+      self.current_user = User.find_by(:id => session[:user], :status => %w[active confirmed suspended])
 
       if session[:fingerprint] &&
          session[:fingerprint] != current_user.fingerprint
@@ -199,7 +199,7 @@ class ApplicationController < ActionController::Base
   ##
   # wrap a web page in a timeout
   def web_timeout(&block)
-    Timeout.timeout(Settings.web_timeout, Timeout::Error, &block)
+    Timeout.timeout(Settings.web_timeout, &block)
   rescue ActionView::Template::Error => e
     e = e.cause