about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-12-10 07:39:54 +0100
committermultiple creatures <dev@multiple-creature.party>2020-02-21 00:20:50 -0600
commit73fe110ad209ffda2d26df523eb0304e10c72d22 (patch)
tree11ebc57affb61d23c8d0078131d378a6db68fc52 /app/controllers
parent755d96d5b5f9c7e47e2f34d299d8965f6e8d4daa (diff)
port tootsuite#12593 to monsterfork: Fix missing error templates for non-HTML requests
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index a88be8734..9bb3f5b37 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -223,10 +223,7 @@ class ApplicationController < ActionController::Base
   end
 
   def respond_with_error(code)
-    respond_to do |format|
-      format.any  { head code }
-      format.html { render "errors/#{code}", layout: 'error', status: code }
-    end
+    render "errors/#{code}", layout: 'error', status: code, formats: [:html]
   end
 
   def monsterfork_api