From: Toshi MARUYAMA Date: Sat, 9 Nov 2019 17:11:06 +0000 (+0000) Subject: cleanup: rubocop: fix Layout/MultilineBlockLayout in app/controllers/auto_completes_c... X-Git-Tag: 4.1.0~58 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=05d9791e69b58718fe08ee98f8467e70de532dbd;p=redmine.git cleanup: rubocop: fix Layout/MultilineBlockLayout in app/controllers/auto_completes_controller.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19045 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 03b6224eb..ba0a284ae 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -164,11 +164,6 @@ Layout/MultilineArrayBraceLayout: - 'app/helpers/settings_helper.rb' - 'app/helpers/users_helper.rb' -# Cop supports --auto-correct. -Layout/MultilineBlockLayout: - Exclude: - - 'app/controllers/auto_completes_controller.rb' - # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: symmetrical, new_line, same_line diff --git a/app/controllers/auto_completes_controller.rb b/app/controllers/auto_completes_controller.rb index 336885349..d0554767e 100644 --- a/app/controllers/auto_completes_controller.rb +++ b/app/controllers/auto_completes_controller.rb @@ -53,10 +53,11 @@ class AutoCompletesController < ApplicationController end def format_issues_json(issues) - issues.map {|issue| { - 'id' => issue.id, - 'label' => "#{issue.tracker} ##{issue.id}: #{issue.subject.to_s.truncate(60)}", - 'value' => issue.id + issues.map {|issue| + { + 'id' => issue.id, + 'label' => "#{issue.tracker} ##{issue.id}: #{issue.subject.to_s.truncate(60)}", + 'value' => issue.id } } end