summaryrefslogtreecommitdiffstats
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-19 11:15:43 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-19 11:15:43 +0000
commit0fdaa963aaa861424bca0d3f321bb4406ed73e70 (patch)
treee95ac81b9053d8a08c812824bb0ec592400fcede /app/models/project.rb
parent0ea9e05b688f06fc0221d28190731372a32bae45 (diff)
downloadredmine-0fdaa963aaa861424bca0d3f321bb4406ed73e70.tar.gz
redmine-0fdaa963aaa861424bca0d3f321bb4406ed73e70.zip
code cleanup: rubocop: fix Style/WhileUntilModifier in app/models/project.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18758 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index b04cec68c..948eac1f8 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -868,7 +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