Replace obsolete HTTP status code :unprocessable_entity
The new naming is :unprocessable_content and required by Rack 3.1+
This commit is contained in:

committed by
Sebastian Serth

parent
4e1e8c0f4d
commit
092487344a
@ -123,7 +123,7 @@ class RequestForCommentsController < ApplicationController
|
||||
if @request_for_comment.save
|
||||
format.json { render :show, status: :ok, location: @request_for_comment }
|
||||
else
|
||||
format.json { render json: @request_for_comment.errors, status: :unprocessable_entity }
|
||||
format.json { render json: @request_for_comment.errors, status: :unprocessable_content }
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -140,7 +140,7 @@ class RequestForCommentsController < ApplicationController
|
||||
if @request_for_comment.save
|
||||
format.json { render :show, status: :ok, location: @request_for_comment }
|
||||
else
|
||||
format.json { render json: @request_for_comment.errors, status: :unprocessable_entity }
|
||||
format.json { render json: @request_for_comment.errors, status: :unprocessable_content }
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -183,7 +183,7 @@ class RequestForCommentsController < ApplicationController
|
||||
end
|
||||
else
|
||||
format.html { render :new }
|
||||
format.json { render json: @request_for_comment.errors, status: :unprocessable_entity }
|
||||
format.json { render json: @request_for_comment.errors, status: :unprocessable_content }
|
||||
end
|
||||
end
|
||||
authorize!
|
||||
|
Reference in New Issue
Block a user