From 3b27acb62042ed7c5699158c23f2dfcc1ed36871 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 17 Oct 2019 15:28:34 +0000 Subject: [PATCH] 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 --- .rubocop_todo.yml | 1 - app/helpers/queries_helper.rb | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) 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