diff options
author | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2017-12-26 08:05:44 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 08:05:44 +0900 |
commit | 9596d78a12ddac7ade8659cf2843aaeb44cc58d6 (patch) | |
tree | cdfa6d4f6caca393c5d2e2fb9053756369ac5756 /activestorage/app | |
parent | 237397e41a6a71fbc8424201a21cad00e132ff21 (diff) | |
parent | 6f035067e40b4044ab241cd8086ee44897c975c3 (diff) | |
download | rails-9596d78a12ddac7ade8659cf2843aaeb44cc58d6.tar.gz rails-9596d78a12ddac7ade8659cf2843aaeb44cc58d6.tar.bz2 rails-9596d78a12ddac7ade8659cf2843aaeb44cc58d6.zip |
Merge pull request #31563 from Dorian/prevent-shadowing-outer-variables
Prevent shadowing outer variables
Diffstat (limited to 'activestorage/app')
-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 |