aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-01-08 22:59:27 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-01-08 22:59:27 +0100
commit2e58400ba9f0d760886335434d7030ad6e2b2f03 (patch)
treeafd84b8f0322615e4e4e4822a0a75eb5c2d4f1e4
parentcc12294c26029abfa0eed0c050c8ab9287ac257a (diff)
downloadoperum-2e58400ba9f0d760886335434d7030ad6e2b2f03.tar.gz
operum-2e58400ba9f0d760886335434d7030ad6e2b2f03.zip
Move away from :unprocessable_entity to _content
It was apparently deprecated in the previous version and rubocop is now complaining about it. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
-rw-r--r--app/controllers/searches_controller.rb4
-rw-r--r--app/controllers/tags_controller.rb4
-rw-r--r--app/controllers/things_controller.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/searches_controller.rb b/app/controllers/searches_controller.rb
index c811f10..ff738c2 100644
--- a/app/controllers/searches_controller.rb
+++ b/app/controllers/searches_controller.rb
@@ -26,7 +26,7 @@ class SearchesController < ApplicationController
if @search.save
redirect_to @search
else
- render :new, status: :unprocessable_entity
+ render :new, status: :unprocessable_content
end
end
@@ -34,7 +34,7 @@ class SearchesController < ApplicationController
if @search.update(search_params)
redirect_to @search, status: :see_other
else
- render :edit, status: :unprocessable_entity
+ render :edit, status: :unprocessable_content
end
end
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 7f77f4c..37d7965 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -21,7 +21,7 @@ class TagsController < ApplicationController
if @tag.save
redirect_to tags_url, notice: t('tags.create-success')
else
- render :new, status: :unprocessable_entity
+ render :new, status: :unprocessable_content
end
end
@@ -47,7 +47,7 @@ class TagsController < ApplicationController
if updated
redirect_to tags_url, notice: t('tags.update-success')
else
- render :edit, status: :unprocessable_entity
+ render :edit, status: :unprocessable_content
end
rescue ActiveRecord::RecordInvalid
redirect_to edit_tag_path(@tag), alert: t('tags.update-fail')
diff --git a/app/controllers/things_controller.rb b/app/controllers/things_controller.rb
index cc9b5b0..97761aa 100644
--- a/app/controllers/things_controller.rb
+++ b/app/controllers/things_controller.rb
@@ -29,7 +29,7 @@ class ThingsController < ApplicationController
if updated
redirect_to thing_url(@thing.reload), notice: t('things.create-success')
else
- render :new, status: :unprocessable_entity
+ render :new, status: :unprocessable_content
end
end
@@ -46,7 +46,7 @@ class ThingsController < ApplicationController
if updated
redirect_to edit_thing_url(@thing), notice: t('things.update-success')
else
- render :edit, status: :unprocessable_entity
+ render :edit, status: :unprocessable_content
end
end