Fix detection of timeouts
authorTom Hughes <tom@compton.nu>
Mon, 12 Aug 2013 16:33:18 +0000 (17:33 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 12 Aug 2013 16:33:18 +0000 (17:33 +0100)
app/controllers/application_controller.rb

index 5ee483ed40589c1812db24c662cc55acb77be217..0cd850cc689c2469a6a529cc96076a7af4d0ed7d 100644 (file)
@@ -370,7 +370,7 @@ class ApplicationController < ActionController::Base
   rescue ActionView::Template::Error => ex
     ex = ex.original_exception
 
-    if ex.is_a?(ActiveRecord::StatementInvalid) and ex.message =~ /^Timeout::Error/
+    if ex.is_a?(ActiveRecord::StatementInvalid) and ex.message =~ /execution expired/
       ex = Timeout::Error.new
     end