mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 17:26:06 +01:00
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
This commit is contained in:
@@ -102,11 +102,6 @@ Layout/CommentIndentation:
|
|||||||
Layout/DotPosition:
|
Layout/DotPosition:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Layout/ElseAlignment:
|
|
||||||
Exclude:
|
|
||||||
- 'app/helpers/attachments_helper.rb'
|
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Layout/EmptyLineAfterGuardClause:
|
Layout/EmptyLineAfterGuardClause:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|||||||
@@ -33,13 +33,12 @@ module AttachmentsHelper
|
|||||||
# :thumbails -- display thumbnails if enabled in settings
|
# :thumbails -- display thumbnails if enabled in settings
|
||||||
def link_to_attachments(container, options = {})
|
def link_to_attachments(container, options = {})
|
||||||
options.assert_valid_keys(:author, :thumbnails)
|
options.assert_valid_keys(:author, :thumbnails)
|
||||||
|
attachments =
|
||||||
attachments = if container.attachments.loaded?
|
if container.attachments.loaded?
|
||||||
container.attachments
|
container.attachments
|
||||||
else
|
else
|
||||||
container.attachments.preload(:author).to_a
|
container.attachments.preload(:author).to_a
|
||||||
end
|
end
|
||||||
|
|
||||||
if attachments.any?
|
if attachments.any?
|
||||||
options = {
|
options = {
|
||||||
:editable => container.attachments_editable?,
|
:editable => container.attachments_editable?,
|
||||||
|
|||||||
Reference in New Issue
Block a user