# 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'
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