1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Rename shadowed variable

This commit renames shadowed variable `attributes`.
This commit is contained in:
Alberto Almagro 2018-10-13 17:05:13 +02:00
parent 01b67837a1
commit 123444ee0e

View file

@ -68,14 +68,14 @@ module ActionText
end
def to_rich_text_attributes(attributes = {})
attributes.dup.tap do |attributes|
attributes[:sgid] = attachable_sgid
attributes[:content_type] = attachable_content_type
attributes[:previewable] = true if previewable_attachable?
attributes[:filename] = attachable_filename
attributes[:filesize] = attachable_filesize
attributes[:width] = attachable_metadata[:width]
attributes[:height] = attachable_metadata[:height]
attributes.dup.tap do |attrs|
attrs[:sgid] = attachable_sgid
attrs[:content_type] = attachable_content_type
attrs[:previewable] = true if previewable_attachable?
attrs[:filename] = attachable_filename
attrs[:filesize] = attachable_filesize
attrs[:width] = attachable_metadata[:width]
attrs[:height] = attachable_metadata[:height]
end.compact
end
end