]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Fix new rubocop warnings
[rails.git] / app / controllers / application_controller.rb
index 045e93eb7a1f4f073c280e79738f007a546910d8..a2211ea69b4fde7a7ba1c81e696b102762a4e2cd 100644 (file)
@@ -235,7 +235,7 @@ class ApplicationController < ActionController::Base
     e = e.cause
 
     if e.is_a?(Timeout::Error) ||
-       (e.is_a?(ActiveRecord::StatementInvalid) && e.message =~ /execution expired/)
+       (e.is_a?(ActiveRecord::StatementInvalid) && e.message.include?("execution expired"))
       render :action => "timeout"
     else
       raise