aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorDorian MariƩ <dorian@doma.io>2017-12-25 22:47:55 +0100
committerDorian MariƩ <dorian@doma.io>2017-12-25 22:47:55 +0100
commit6f035067e40b4044ab241cd8086ee44897c975c3 (patch)
treecdfa6d4f6caca393c5d2e2fb9053756369ac5756 /activestorage
parent237397e41a6a71fbc8424201a21cad00e132ff21 (diff)
downloadrails-6f035067e40b4044ab241cd8086ee44897c975c3.tar.gz
rails-6f035067e40b4044ab241cd8086ee44897c975c3.tar.bz2
rails-6f035067e40b4044ab241cd8086ee44897c975c3.zip
prevent shadowing outer variables
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/app/models/active_storage/variation.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activestorage/app/models/active_storage/variation.rb b/activestorage/app/models/active_storage/variation.rb
index 09997eb97f..2b599a4710 100644
--- a/activestorage/app/models/active_storage/variation.rb
+++ b/activestorage/app/models/active_storage/variation.rb
@@ -46,15 +46,15 @@ class ActiveStorage::Variation
# Accepts an open MiniMagick image instance, like what's returned by <tt>MiniMagick::Image.read(io)</tt>,
# and performs the +transformations+ against it. The transformed image instance is then returned.
def transform(image)
- transformations.each do |(method, argument)|
- if method.to_s == "combine_options"
+ transformations.each do |(transformation_method, transformation_argument)|
+ if transformation_method.to_s == "combine_options"
image.combine_options do |combination|
- argument.each do |(method, argument)|
+ transformation_argument.each do |(method, argument)|
pass_transform_argument(combination, method, argument)
end
end
else
- pass_transform_argument(image, method, argument)
+ pass_transform_argument(image, transformation_method, transformation_argument)
end
end
end