From 6f035067e40b4044ab241cd8086ee44897c975c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20Mari=C3=A9?= Date: Mon, 25 Dec 2017 22:47:55 +0100 Subject: prevent shadowing outer variables --- activestorage/app/models/active_storage/variation.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activestorage') 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 MiniMagick::Image.read(io), # 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 -- cgit v1.2.3