diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-13 12:32:17 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-14 13:17:30 +0200 |
commit | d6c84845b35ebee40a9405a49c86b937d43d5904 (patch) | |
tree | 9e7658f835974f0d0c5b2051985097b704508f31 | |
parent | 6c50ad0234f4521d77a5efcc295d418d529b924f (diff) | |
download | rails-d6c84845b35ebee40a9405a49c86b937d43d5904.tar.gz rails-d6c84845b35ebee40a9405a49c86b937d43d5904.tar.bz2 rails-d6c84845b35ebee40a9405a49c86b937d43d5904.zip |
avoiding symbol to proc again
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index c33bc6aa47..9a12a1866a 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -76,7 +76,7 @@ module ActiveRecord else relation = Arel::Table.new(@reflection.table_name) relation.where(relation[@reflection.primary_key_name].eq(@owner.id). - and(Arel::Predicates::In.new(relation[@reflection.klass.primary_key], records.map(&:id))) + and(Arel::Predicates::In.new(relation[@reflection.klass.primary_key], records.map { |r| r.id })) ).update(relation[@reflection.primary_key_name] => nil) @owner.class.update_counters(@owner.id, cached_counter_attribute_name => -records.size) if has_cached_counter? |