summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/issuable_actions.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-09-19 01:25:23 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-09-19 01:29:32 +0800
commit6a4ee9aa7140862075cafae1ddebd133eec52b5b (patch)
tree9890bb5c906a0d6e207149ae5fe1df84d213fa7c /app/controllers/concerns/issuable_actions.rb
parent9ae92b8caa6c11d8860f86b7d6378062215d1b72 (diff)
downloadgitlab-ce-6a4ee9aa7140862075cafae1ddebd133eec52b5b.tar.gz
Allow simple ivar ||= form. Update accordingly
Diffstat (limited to 'app/controllers/concerns/issuable_actions.rb')
-rw-r--r--app/controllers/concerns/issuable_actions.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb
index 1539f2dcbdc..0b4b1e65b1d 100644
--- a/app/controllers/concerns/issuable_actions.rb
+++ b/app/controllers/concerns/issuable_actions.rb
@@ -1,4 +1,3 @@
-# rubocop:disable Cop/ModuleWithInstanceVariables
module IssuableActions
extend ActiveSupport::Concern
@@ -8,6 +7,7 @@ module IssuableActions
before_action :authorize_admin_issuable!, only: :bulk_update
end
+ # rubocop:disable Cop/ModuleWithInstanceVariables
def destroy
issuable.destroy
destroy_method = "destroy_#{issuable.class.name.underscore}".to_sym
@@ -36,6 +36,7 @@ module IssuableActions
private
+ # rubocop:disable Cop/ModuleWithInstanceVariables
def render_conflict_response
respond_to do |format|
format.html do
@@ -53,6 +54,7 @@ module IssuableActions
end
end
+ # rubocop:disable Cop/ModuleWithInstanceVariables
def labels
@labels ||= LabelsFinder.new(current_user, project_id: @project.id).execute
end
@@ -63,6 +65,7 @@ module IssuableActions
end
end
+ # rubocop:disable Cop/ModuleWithInstanceVariables
def authorize_admin_issuable!
unless can?(current_user, :"admin_#{resource_name}", @project)
return access_denied!