]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/models/project.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:54:12 +0000 (15:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:54:12 +0000 (15:54 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18832 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/models/project.rb

index 08218813f5061b47c6f1ace153e5bb5cd657948f..23a4db637ba2af16d24692c44364d6413089f350 100644 (file)
@@ -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'
index 948eac1f8d23ca5827120dade36b92e9a33c47d6..9568a5b85bfb97f5254b562b9c610464ab436dbb 100644 (file)
@@ -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