mirror of
https://github.com/redmine/redmine.git
synced 2025-12-17 22:10:27 +01:00
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
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user