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

.rubocop_todo.yml
app/helpers/attachments_helper.rb

index dcd4a3335b66f45bf2a69c4151a2a8b4ac32f823..7d48884529f500574a854c473df7fb104650ab31 100644 (file)
@@ -102,11 +102,6 @@ Layout/CommentIndentation:
 Layout/DotPosition:
   Enabled: false
 
-# Cop supports --auto-correct.
-Layout/ElseAlignment:
-  Exclude:
-    - 'app/helpers/attachments_helper.rb'
-
 # Cop supports --auto-correct.
 Layout/EmptyLineAfterGuardClause:
   Enabled: false
index 476b93ef3addf000f7392ed3d3083e95611ac635..d03997c4b9d3ac42be34df7dddf6063dda4018ef 100644 (file)
@@ -33,13 +33,12 @@ module AttachmentsHelper
   #   :thumbails -- display thumbnails if enabled in settings
   def link_to_attachments(container, options = {})
     options.assert_valid_keys(:author, :thumbnails)
-
-    attachments = if container.attachments.loaded?
-      container.attachments
-    else
-      container.attachments.preload(:author).to_a
-    end
-
+    attachments =
+      if container.attachments.loaded?
+        container.attachments
+      else
+        container.attachments.preload(:author).to_a
+      end
     if attachments.any?
       options = {
         :editable => container.attachments_editable?,