diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-19 11:15:43 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-19 11:15:43 +0000 |
commit | 0fdaa963aaa861424bca0d3f321bb4406ed73e70 (patch) | |
tree | e95ac81b9053d8a08c812824bb0ec592400fcede /app/models/project.rb | |
parent | 0ea9e05b688f06fc0221d28190731372a32bae45 (diff) | |
download | redmine-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.rb | 3 |
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 |