mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 23:07:26 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user