Make unacceptable actually return a 422 status code, since it returns the 422.html page

This commit is contained in:
Cyril Rohr
2025-04-01 14:08:46 +02:00
committed by Oliver Günther
parent 5dfee77e47
commit ce5fa0597f
+2 -1
View File
@@ -10,9 +10,10 @@ class ErrorsController < ApplicationController
render_404
end
# this may be called on CSRF validation failure
def unacceptable
render file: "#{Rails.public_path.join('422.html')}",
status: :not_acceptable,
status: :unprocessable_entity,
layout: false
end