summaryrefslogtreecommitdiffstats
path: root/app/models/query.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-03-07 07:29:14 +0000
committerGo MAEDA <maeda@farend.jp>2020-03-07 07:29:14 +0000
commit36143469625410bab07ac3ed90be1bef2f7e1a9e (patch)
tree40bc1ceca3b500fcb8ec60baf7f8bb7064fa8f6c /app/models/query.rb
parent7a97dba9ab474274ce012fc0b94734d8f84839d2 (diff)
downloadredmine-36143469625410bab07ac3ed90be1bef2f7e1a9e.tar.gz
redmine-36143469625410bab07ac3ed90be1bef2f7e1a9e.zip
Fix a RuboCop offense Style/MultipleComparison (#33083).
git-svn-id: http://svn.redmine.org/redmine/trunk@19563 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r--app/models/query.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/query.rb b/app/models/query.rb
index 9e8526645..cefe1a0ef 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -924,7 +924,7 @@ class Query < ActiveRecord::Base
end
end
- if field == 'project_id' || (self.type == 'ProjectQuery' && (field == 'id' || field == 'parent_id'))
+ if field == 'project_id' || (self.type == 'ProjectQuery' && %w[id parent_id].include?(field))
if v.delete('mine')
v += User.current.memberships.map(&:project_id).map(&:to_s)
end