mirror of
https://github.com/redmine/redmine.git
synced 2025-12-24 01:10:38 +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.
|
# Cop supports --auto-correct.
|
||||||
Style/WhileUntilModifier:
|
Style/WhileUntilModifier:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/helpers/issues_helper.rb'
|
|
||||||
- 'app/helpers/queries_helper.rb'
|
- 'app/helpers/queries_helper.rb'
|
||||||
- 'app/models/attachment.rb'
|
- 'app/models/attachment.rb'
|
||||||
- 'app/models/project.rb'
|
- 'app/models/project.rb'
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ module IssuesHelper
|
|||||||
def issue_list(issues, &block)
|
def issue_list(issues, &block)
|
||||||
ancestors = []
|
ancestors = []
|
||||||
issues.each do |issue|
|
issues.each do |issue|
|
||||||
while ancestors.any? && !issue.is_descendant_of?(ancestors.last)
|
while ancestors.any? &&
|
||||||
|
!issue.is_descendant_of?(ancestors.last)
|
||||||
ancestors.pop
|
ancestors.pop
|
||||||
end
|
end
|
||||||
yield issue, ancestors.size
|
yield issue, ancestors.size
|
||||||
@@ -35,7 +36,8 @@ module IssuesHelper
|
|||||||
def grouped_issue_list(issues, query, &block)
|
def grouped_issue_list(issues, query, &block)
|
||||||
ancestors = []
|
ancestors = []
|
||||||
grouped_query_results(issues, query) do |issue, group_name, group_count, group_totals|
|
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
|
ancestors.pop
|
||||||
end
|
end
|
||||||
yield issue, ancestors.size, group_name, group_count, group_totals
|
yield issue, ancestors.size, group_name, group_count, group_totals
|
||||||
|
|||||||
Reference in New Issue
Block a user