From: Toshi MARUYAMA Date: Thu, 17 Oct 2019 15:28:34 +0000 (+0000) Subject: code cleanup: rubocop: fix Layout/ElseAlignment in app/helpers/queries_helper.rb X-Git-Tag: 4.1.0~383 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3b27acb62042ed7c5699158c23f2dfcc1ed36871;p=redmine.git code cleanup: rubocop: fix Layout/ElseAlignment in app/helpers/queries_helper.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18712 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 08335ab49..dcd4a3335 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -106,7 +106,6 @@ Layout/DotPosition: Layout/ElseAlignment: Exclude: - 'app/helpers/attachments_helper.rb' - - 'app/helpers/queries_helper.rb' # Cop supports --auto-correct. Layout/EmptyLineAfterGuardClause: diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 55b7d5812..a9dce7456 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -157,11 +157,12 @@ module QueriesHelper def total_tag(column, value) label = content_tag('span', "#{column.caption}:") - value = if [:hours, :spent_hours, :total_spent_hours, :estimated_hours].include? column.name - format_hours(value) - else - format_object(value) - end + value = + if [:hours, :spent_hours, :total_spent_hours, :estimated_hours].include? column.name + format_hours(value) + else + format_object(value) + end value = content_tag('span', value, :class => 'value') content_tag('span', label + " " + value, :class => "total-for-#{column.name.to_s.dasherize}") end