From d4595fbf292d2f42af9f3032b2eb28e16ddf8dc6 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Sun, 15 Mar 2020 20:56:54 +0000 Subject: [PATCH] FIX: Fix html response in development after ApplicationController reload In development, if the ApplicationController is reloaded, then, previous to this commit we were emitting an instance of the previous RenderEmpty class, but rescuing from the reloaded instance. Looking up RenderEmpty by its fully qualified name fixes this. --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 23872ed5606..3ae29ee400b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -650,7 +650,7 @@ class ApplicationController < ActionController::Base def check_xhr # bypass xhr check on PUT / POST / DELETE provided api key is there, otherwise calling api is annoying return if !request.get? && (is_api? || is_user_api?) - raise RenderEmpty.new unless ((request.format && request.format.json?) || request.xhr?) + raise ApplicationController::RenderEmpty.new unless ((request.format && request.format.json?) || request.xhr?) end def self.requires_login(arg = {})