summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.rubocop_todo.yml1
-rw-r--r--app/models/project.rb4
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