]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Layout/ElseAlignment in app/helpers/queries_helper.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Oct 2019 15:28:34 +0000 (15:28 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Oct 2019 15:28:34 +0000 (15:28 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18712 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/helpers/queries_helper.rb

index 08335ab49c4fec0d45a7640249d9b0bd86775d34..dcd4a3335b66f45bf2a69c4151a2a8b4ac32f823 100644 (file)
@@ -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:
index 55b7d5812323e1b5126ad2f28f0144d0f9639460..a9dce745675da9cab5ef84a37749346149c25e96 100644 (file)
@@ -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