Fix RuboCop offense Rails/HttpStatus (#39889).

git-svn-id: https://svn.redmine.org/redmine/trunk@22837 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2024-05-18 05:56:55 +00:00
parent 58e9cd420a
commit a9518e28b8
83 changed files with 376 additions and 398 deletions

View File

@@ -57,7 +57,7 @@ class WatchersController < ApplicationController
respond_to do |format|
format.html do
redirect_to_referer_or do
render(:html => 'Watcher added.', :status => 200, :layout => true)
render(:html => 'Watcher added.', :status => :ok, :layout => true)
end
end
format.js {@users = users_for_new_watcher}
@@ -71,7 +71,7 @@ class WatchersController < ApplicationController
@users = Principal.assignable_watchers.where(:id => user_ids).to_a
end
if @users.blank?
head 200
head :ok
end
end
@@ -83,7 +83,7 @@ class WatchersController < ApplicationController
respond_to do |format|
format.html do
redirect_to_referer_or do
render(:html => 'Watcher removed.', :status => 200, :layout => true)
render(:html => 'Watcher removed.', :status => :ok, :layout => true)
end
end
format.js
@@ -132,7 +132,7 @@ class WatchersController < ApplicationController
format.html do
text = watching ? 'Watcher added.' : 'Watcher removed.'
redirect_to_referer_or do
render(:html => text, :status => 200, :layout => true)
render(:html => text, :status => :ok, :layout => true)
end
end
format.js do