diff options
author | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2010-07-15 03:43:59 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-19 23:44:45 +0800 |
commit | 247886e1b4256aeebc6b5fde0549400240b04e35 (patch) | |
tree | 18db2e00db04f30ddc76120c603fce41b7f737ab /activerecord/lib/active_record/associations/association_collection.rb | |
parent | b22c11fa533fd523e8cadd36e75dd76b6a9f0488 (diff) | |
download | rails-247886e1b4256aeebc6b5fde0549400240b04e35.tar.gz rails-247886e1b4256aeebc6b5fde0549400240b04e35.tar.bz2 rails-247886e1b4256aeebc6b5fde0549400240b04e35.zip |
Removed warnings when a variable is shadowed
Diffstat (limited to 'activerecord/lib/active_record/associations/association_collection.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index f4e34657a5..7abb738a74 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -218,9 +218,9 @@ module ActiveRecord # are actually removed from the database, that depends precisely on # +delete_records+. They are in any case removed from the collection. def delete(*records) - remove_records(records) do |records, old_records| + remove_records(records) do |_records, old_records| delete_records(old_records) if old_records.any? - records.each { |record| @target.delete(record) } + _records.each { |record| @target.delete(record) } end end @@ -231,7 +231,7 @@ module ActiveRecord # ignoring the +:dependent+ option. def destroy(*records) records = find(records) if records.any? {|record| record.kind_of?(Fixnum) || record.kind_of?(String)} - remove_records(records) do |records, old_records| + remove_records(records) do |_records, old_records| old_records.each { |record| record.destroy } end |