From 9d8ac710ef55ac2fc28ffa28e95b2b24a1004ac7 Mon Sep 17 00:00:00 2001 From: Anupam Choudhury Date: Wed, 20 Mar 2013 13:28:50 +0530 Subject: Properly named variable inside block Closes #9824. --- activerecord/lib/active_record/associations/collection_association.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/associations') diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 73b4a187c8..51bcac61c7 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -507,8 +507,8 @@ module ActiveRecord records.flatten.each do |record| raise_on_type_mismatch(record) - add_to_target(record) do |r| - result &&= insert_record(record) unless owner.new_record? + add_to_target(record) do |rec| + result &&= insert_record(rec) unless owner.new_record? end end -- cgit v1.2.3