diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-19 04:29:47 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-19 04:29:47 +0000 |
commit | 41e774de6e16519ff717cf23b2862dc5ccf50a12 (patch) | |
tree | eb6a5f84f6f2e8bd60e275dd56accb61f2ad3f0f | |
parent | abf2ad12e57a0e74f61d3354c41d094ab3a052bb (diff) | |
download | redmine-41e774de6e16519ff717cf23b2862dc5ccf50a12.tar.gz redmine-41e774de6e16519ff717cf23b2862dc5ccf50a12.zip |
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
-rw-r--r-- | .rubocop_todo.yml | 1 | ||||
-rw-r--r-- | app/helpers/queries_helper.rb | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f5d714884..9078a7fda 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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' diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index a9dce7456..fa03a76ef 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -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 |