diff options
author | Robert Speicher <robert@gitlab.com> | 2018-09-13 17:53:05 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-09-13 17:53:05 +0300 |
commit | c7d1eef671dbf598814a6c2ff1f81b924583ae8a (patch) | |
tree | 23988df1d29e933943858a66821ba7f493976b3e /app/controllers/projects/labels_controller.rb | |
parent | ff5d8b635f234241441009e41af7b61f5804b2c2 (diff) | |
parent | 2039c8280db1646845c33d6c5a74e5f23ca6f4de (diff) |
Merge branch 'rubocop-code-reuse' into 'master'
Add RuboCop cops to enforce code reusing rules
See merge request gitlab-org/gitlab-ce!21391
Diffstat (limited to 'app/controllers/projects/labels_controller.rb')
-rw-r--r-- | app/controllers/projects/labels_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/labels_controller.rb b/app/controllers/projects/labels_controller.rb index 69332ee2a0e..1fd4f0721a7 100644 --- a/app/controllers/projects/labels_controller.rb +++ b/app/controllers/projects/labels_controller.rb @@ -90,6 +90,7 @@ class Projects::LabelsController < Projects::ApplicationController end end + # rubocop: disable CodeReuse/ActiveRecord def set_priorities Label.transaction do available_labels_ids = @available_labels.where(id: params[:label_ids]).pluck(:id) @@ -105,6 +106,7 @@ class Projects::LabelsController < Projects::ApplicationController format.json { render json: { message: 'success' } } end end + # rubocop: enable CodeReuse/ActiveRecord def promote promote_service = Labels::PromoteService.new(@project, @current_user) |