]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/browse_controller.rb
Replace openID.js with funky rails generated javascript
[rails.git] / app / controllers / browse_controller.rb
index 5c7912d154ec12a73769c6a41d8ee9de4e5021db..a511d67d35fb54cc558ff124a894abf03469540f 100644 (file)
@@ -84,7 +84,13 @@ private
     SystemTimer.timeout_after(30) do
       yield
     end
+  rescue ActionView::TemplateError => ex
+    if ex.original_exception.is_a?(Timeout::Error)
+      render :action => "timeout"
+    else
+      raise
+    end
   rescue Timeout::Error
-    render :action => "timeout", :status => :request_timeout
+    render :action => "timeout"
   end
 end