From 36143469625410bab07ac3ed90be1bef2f7e1a9e Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 7 Mar 2020 07:29:14 +0000 Subject: [PATCH] Fix a RuboCop offense Style/MultipleComparison (#33083). git-svn-id: http://svn.redmine.org/redmine/trunk@19563 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5