From 2c325182b84ea4c75855c777b25de0f15fd218e5 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Thu, 13 Dec 2018 06:43:31 +0900 Subject: Fix warning: shadowing outer local variable - attribute --- railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/generators/test_unit/scaffold') diff --git a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb index 662b5e206e..6df50c3217 100644 --- a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +++ b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb @@ -56,7 +56,7 @@ module TestUnit # :nodoc: end def boolean?(name) - attribute = attributes.find { |attribute| attribute.name == name } + attribute = attributes.find { |attr| attr.name == name } attribute&.type == :boolean end end -- cgit v1.2.3