diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-06-07 09:45:16 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-06-07 09:45:16 +1100 |
commit | a544e46bb083c27bfa2966ea67ddf97b5dc7cb08 (patch) | |
tree | 14ffd0a5844127e7a63786a5e695832cc356ab2c /app/controllers/groups | |
parent | 71f9c43c833531fb6e2231225b74a42dea4ae00c (diff) | |
download | gitlab-ce-a544e46bb083c27bfa2966ea67ddf97b5dc7cb08.tar.gz |
Add a rubocop rule to check if a method 'redirect_to' is used without explicitly set 'status' in 'destroy' actions of controllers31840-add-a-rubocop-that-forbids-redirect_to-inside-a-controller-destroy-action-without-an-explicit-status
Diffstat (limited to 'app/controllers/groups')
-rw-r--r-- | app/controllers/groups/avatars_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/groups/labels_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/groups/avatars_controller.rb b/app/controllers/groups/avatars_controller.rb index ad2c20b42db..735915abdaa 100644 --- a/app/controllers/groups/avatars_controller.rb +++ b/app/controllers/groups/avatars_controller.rb @@ -5,6 +5,6 @@ class Groups::AvatarsController < Groups::ApplicationController @group.remove_avatar! @group.save - redirect_to edit_group_path(@group) + redirect_to edit_group_path(@group), status: 302 end end diff --git a/app/controllers/groups/labels_controller.rb b/app/controllers/groups/labels_controller.rb index 3fa0516fb0c..dda59262483 100644 --- a/app/controllers/groups/labels_controller.rb +++ b/app/controllers/groups/labels_controller.rb @@ -54,7 +54,7 @@ class Groups::LabelsController < Groups::ApplicationController respond_to do |format| format.html do - redirect_to group_labels_path(@group), notice: 'Label was removed' + redirect_to group_labels_path(@group), status: 302, notice: 'Label was removed' end format.js end |