mirror of
https://github.com/redmine/redmine.git
synced 2025-12-24 09:20:37 +01:00
code cleanup: rubocop: fix Style/WhileUntilModifier in app/helpers/issues_helper.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18514 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1715,7 +1715,6 @@ Style/WhenThen:
|
||||
# Cop supports --auto-correct.
|
||||
Style/WhileUntilModifier:
|
||||
Exclude:
|
||||
- 'app/helpers/issues_helper.rb'
|
||||
- 'app/helpers/queries_helper.rb'
|
||||
- 'app/models/attachment.rb'
|
||||
- 'app/models/project.rb'
|
||||
|
||||
@@ -24,7 +24,8 @@ module IssuesHelper
|
||||
def issue_list(issues, &block)
|
||||
ancestors = []
|
||||
issues.each do |issue|
|
||||
while ancestors.any? && !issue.is_descendant_of?(ancestors.last)
|
||||
while ancestors.any? &&
|
||||
!issue.is_descendant_of?(ancestors.last)
|
||||
ancestors.pop
|
||||
end
|
||||
yield issue, ancestors.size
|
||||
@@ -35,7 +36,8 @@ module IssuesHelper
|
||||
def grouped_issue_list(issues, query, &block)
|
||||
ancestors = []
|
||||
grouped_query_results(issues, query) do |issue, group_name, group_count, group_totals|
|
||||
while ancestors.any? && !issue.is_descendant_of?(ancestors.last)
|
||||
while ancestors.any? &&
|
||||
!issue.is_descendant_of?(ancestors.last)
|
||||
ancestors.pop
|
||||
end
|
||||
yield issue, ancestors.size, group_name, group_count, group_totals
|
||||
|
||||
Reference in New Issue
Block a user