Permalink
Browse files

avoiding symbol to proc again

  • Loading branch information...
1 parent abd9736 commit e86b7585928b9d673a0dc7f146819885c7a28667 @tenderlove tenderlove committed Aug 13, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/has_many_association.rb
@@ -76,7 +76,7 @@ def delete_records(records)
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?

0 comments on commit e86b758

Please sign in to comment.