aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlberto Almagro <albertoalmagro@gmail.com>2018-10-13 17:05:13 +0200
committerAlberto Almagro <albertoalmagro@gmail.com>2018-10-13 17:05:13 +0200
commit123444ee0edaedca165c97472b3d2d84e2a1b65e (patch)
tree833d3c7e48892004c04722f1f742cca8b8c59347
parent01b67837a116cd34c53d8d6e8e7eb1853a6a4710 (diff)
downloadrails-123444ee0edaedca165c97472b3d2d84e2a1b65e.tar.gz
rails-123444ee0edaedca165c97472b3d2d84e2a1b65e.tar.bz2
rails-123444ee0edaedca165c97472b3d2d84e2a1b65e.zip
Rename shadowed variable
This commit renames shadowed variable `attributes`.
-rw-r--r--lib/action_text/attachable.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/action_text/attachable.rb b/lib/action_text/attachable.rb
index fce3d6d9c3..9776d2cb13 100644
--- a/lib/action_text/attachable.rb
+++ b/lib/action_text/attachable.rb
@@ -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