From 73fe110ad209ffda2d26df523eb0304e10c72d22 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 10 Dec 2019 07:39:54 +0100 Subject: port tootsuite#12593 to monsterfork: Fix missing error templates for non-HTML requests --- app/controllers/application_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'app/controllers/application_controller.rb') 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 -- cgit