diff options
-rw-r--r-- | .rubocop_todo.yml | 5 | ||||
-rw-r--r-- | app/helpers/attachments_helper.rb | 13 |
2 files changed, 6 insertions, 12 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index dcd4a3335..7d4888452 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -103,11 +103,6 @@ Layout/DotPosition: Enabled: false # Cop supports --auto-correct. -Layout/ElseAlignment: - Exclude: - - 'app/helpers/attachments_helper.rb' - -# Cop supports --auto-correct. Layout/EmptyLineAfterGuardClause: Enabled: false diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb index 476b93ef3..d03997c4b 100644 --- a/app/helpers/attachments_helper.rb +++ b/app/helpers/attachments_helper.rb @@ -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?, |