mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:47:22 +08:00
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.
This commit is contained in:
parent
39a7b93c4a
commit
d4595fbf29
|
@ -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 = {})
|
||||
|
|
Loading…
Reference in New Issue
Block a user