Replace obsolete HTTP status code :unprocessable_entity

The new naming is :unprocessable_content and required by Rack 3.1+
This commit is contained in:
Sebastian Serth
2024-06-16 14:33:12 +02:00
committed by Sebastian Serth
parent 4e1e8c0f4d
commit 092487344a
13 changed files with 21 additions and 21 deletions

View File

@ -52,7 +52,7 @@ class FileTemplatesController < ApplicationController
format.json { render :show, status: :created, location: @file_template }
else
format.html { render :new }
format.json { render json: @file_template.errors, status: :unprocessable_entity }
format.json { render json: @file_template.errors, status: :unprocessable_content }
end
end
end
@ -67,7 +67,7 @@ class FileTemplatesController < ApplicationController
format.json { render :show, status: :ok, location: @file_template }
else
format.html { render :edit }
format.json { render json: @file_template.errors, status: :unprocessable_entity }
format.json { render json: @file_template.errors, status: :unprocessable_content }
end
end
end