We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a84c706 commit fce42f9Copy full SHA for fce42f9
1 file changed
app/controllers/application_controller.rb
@@ -37,6 +37,7 @@ def pundit_user
37
def handle_error(status_code = 500, message = nil)
38
status_code = (params[:status_code] || status_code) # params[:status_code] comes from routes for 500, 503, 422 and 404 errors
39
if status_code.is_a?(Symbol) # Convert :forbidden, :not_found, etc. to 403, 404 etc.
40
+ status_code = :unprocessable_content if status_code == :unprocessable_entity
41
status_code = Rack::Utils::SYMBOL_TO_STATUS_CODE[status_code] || status_code
42
end
43
0 commit comments