aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2018-10-13 20:03:18 -0400
committerGitHub <noreply@github.com>2018-10-13 20:03:18 -0400
commit18974137be2c4027dfcf430668edd712e7ec011b (patch)
treec82b5b092d4754e14c65b83fdbb40008fecf67fe
parentcdf58b8f1871bc26d21aab56fb2b7c1e8ec9a831 (diff)
parent123444ee0edaedca165c97472b3d2d84e2a1b65e (diff)
downloadrails-18974137be2c4027dfcf430668edd712e7ec011b.tar.gz
rails-18974137be2c4027dfcf430668edd712e7ec011b.tar.bz2
rails-18974137be2c4027dfcf430668edd712e7ec011b.zip
Merge pull request #31 from albertoalmagro/remove-variable-shadowing
Rename shadowed variable
-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