1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-09 09:01:31 +00:00

code cleanup: rubocop: fix Style/WhileUntilModifier in app/helpers/queries_helper.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18733 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-10-19 04:29:47 +00:00
parent abf2ad12e5
commit 41e774de6e
2 changed files with 2 additions and 5 deletions

View File

@ -1453,7 +1453,6 @@ Style/VariableInterpolation:
# Cop supports --auto-correct.
Style/WhileUntilModifier:
Exclude:
- 'app/helpers/queries_helper.rb'
- 'app/models/attachment.rb'
- 'app/models/project.rb'
- 'lib/redmine/unified_diff.rb'

View File

@ -180,10 +180,8 @@ module QueriesHelper
end
end
param_key = options[:sort_param] || :sort
sort_param = { param_key => query.sort_criteria.add(column.name, order).to_param }
while sort_param.keys.first.to_s =~ /^(.+)\[(.+)\]$/
sort_param = {$1 => {$2 => sort_param.values.first}}
end
sort_param = {param_key => query.sort_criteria.add(column.name, order).to_param}
sort_param = {$1 => {$2 => sort_param.values.first}} while sort_param.keys.first.to_s =~ /^(.+)\[(.+)\]$/
link_options = {
:title => l(:label_sort_by, "\"#{column.caption}\""),
:class => css