Kaynağa Gözat

code cleanup: rubocop: fix Layout/ElseAlignment in app/helpers/attachments_helper.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18713 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.1.0
Toshi MARUYAMA 4 yıl önce
ebeveyn
işleme
d4a428f11e
2 değiştirilmiş dosya ile 6 ekleme ve 12 silme
  1. 0
    5
      .rubocop_todo.yml
  2. 6
    7
      app/helpers/attachments_helper.rb

+ 0
- 5
.rubocop_todo.yml Dosyayı Görüntüle

@@ -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

+ 6
- 7
app/helpers/attachments_helper.rb Dosyayı Görüntüle

@@ -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?,

Loading…
İptal
Kaydet