From: Go MAEDA Date: Sat, 7 Mar 2020 07:29:14 +0000 (+0000) Subject: Fix a RuboCop offense Style/MultipleComparison (#33083). X-Git-Tag: 4.2.0~1167 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=36143469625410bab07ac3ed90be1bef2f7e1a9e;p=redmine.git Fix a RuboCop offense Style/MultipleComparison (#33083). git-svn-id: http://svn.redmine.org/redmine/trunk@19563 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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