diff options
author | Dorian MariƩ <dorian@doma.io> | 2017-12-25 22:47:55 +0100 |
---|---|---|
committer | Dorian MariƩ <dorian@doma.io> | 2017-12-25 22:47:55 +0100 |
commit | 6f035067e40b4044ab241cd8086ee44897c975c3 (patch) | |
tree | cdfa6d4f6caca393c5d2e2fb9053756369ac5756 /activestorage | |
parent | 237397e41a6a71fbc8424201a21cad00e132ff21 (diff) | |
download | rails-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.rb | 8 |
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 |