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
@ -45,7 +45,7 @@ class CommentsController < ApplicationController
|
||||
|
||||
render :show, status: :created, location: @comment
|
||||
else
|
||||
render json: @comment.errors, status: :unprocessable_entity
|
||||
render json: @comment.errors, status: :unprocessable_content
|
||||
end
|
||||
authorize!
|
||||
end
|
||||
@ -55,7 +55,7 @@ class CommentsController < ApplicationController
|
||||
if @comment.update(comment_params_for_update)
|
||||
render :show, status: :ok, location: @comment
|
||||
else
|
||||
render json: @comment.errors, status: :unprocessable_entity
|
||||
render json: @comment.errors, status: :unprocessable_content
|
||||
end
|
||||
authorize!
|
||||
end
|
||||
|
Reference in New Issue
Block a user