mirror of
https://github.com/redmine/redmine.git
synced 2025-12-17 14:00:35 +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.
|
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
||||||
Style/ParenthesesAroundCondition:
|
Style/ParenthesesAroundCondition:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/models/project.rb'
|
|
||||||
- 'app/models/query.rb'
|
- 'app/models/query.rb'
|
||||||
- 'app/models/repository/subversion.rb'
|
- 'app/models/repository/subversion.rb'
|
||||||
- 'app/models/time_entry.rb'
|
- 'app/models/time_entry.rb'
|
||||||
|
|||||||
@@ -868,8 +868,8 @@ class Project < ActiveRecord::Base
|
|||||||
ancestors = projects.first.ancestors.to_a
|
ancestors = projects.first.ancestors.to_a
|
||||||
end
|
end
|
||||||
projects.sort_by(&:lft).each do |project|
|
projects.sort_by(&:lft).each do |project|
|
||||||
while (ancestors.any? &&
|
while ancestors.any? &&
|
||||||
!project.is_descendant_of?(ancestors.last))
|
!project.is_descendant_of?(ancestors.last)
|
||||||
ancestors.pop
|
ancestors.pop
|
||||||
end
|
end
|
||||||
yield project, ancestors.size
|
yield project, ancestors.size
|
||||||
|
|||||||
Reference in New Issue
Block a user