Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-07-11 21:29:33 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-09-18 16:23:45 +0300
commit9ae92b8caa6c11d8860f86b7d6378062215d1b72 (patch)
tree06b7416abad46cb1dd44c19a18a7e40caed30e15 /app/workers/concerns
parent4cadf22e208e3be401824f43ab13d5e6f2ff6465 (diff)
Add cop to make sure we don't use ivar in a module
Diffstat (limited to 'app/workers/concerns')
-rw-r--r--app/workers/concerns/new_issuable.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/concerns/new_issuable.rb b/app/workers/concerns/new_issuable.rb
index eb0d6c9c36c..b6aea921aae 100644
--- a/app/workers/concerns/new_issuable.rb
+++ b/app/workers/concerns/new_issuable.rb
@@ -8,12 +8,14 @@ module NewIssuable
user && issuable
end
+ # rubocop:disable Cop/ModuleWithInstanceVariables
def set_user(user_id)
@user = User.find_by(id: user_id)
log_error(User, user_id) unless @user
end
+ # rubocop:disable Cop/ModuleWithInstanceVariables
def set_issuable(issuable_id)
@issuable = issuable_class.find_by(id: issuable_id)