From 790d2bae705fa5762c7cc520c78d927e8a5afea6 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 22 Oct 2019 15:54:12 +0000 Subject: [PATCH] code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/models/project.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18832 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 1 - app/models/project.rb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 08218813f..23a4db637 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1143,7 +1143,6 @@ Style/ParallelAssignment: # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions. Style/ParenthesesAroundCondition: Exclude: - - 'app/models/project.rb' - 'app/models/query.rb' - 'app/models/repository/subversion.rb' - 'app/models/time_entry.rb' diff --git a/app/models/project.rb b/app/models/project.rb index 948eac1f8..9568a5b85 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -868,8 +868,8 @@ class Project < ActiveRecord::Base ancestors = projects.first.ancestors.to_a end projects.sort_by(&:lft).each do |project| - while (ancestors.any? && - !project.is_descendant_of?(ancestors.last)) + while ancestors.any? && + !project.is_descendant_of?(ancestors.last) ancestors.pop end yield project, ancestors.size