diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-13 15:30:51 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-13 15:30:51 -0800 |
commit | 7b3d85db4c58e2f719981efd6ef5a6b870f6ab49 (patch) | |
tree | 571b86ca825c9fb09118c43449cf3f4fb50d2f32 /activerecord/lib/active_record/associations/has_many_association.rb | |
parent | 3f54f3100b6c262776ad324bd649ff268600e280 (diff) | |
download | rails-7b3d85db4c58e2f719981efd6ef5a6b870f6ab49.tar.gz rails-7b3d85db4c58e2f719981efd6ef5a6b870f6ab49.tar.bz2 rails-7b3d85db4c58e2f719981efd6ef5a6b870f6ab49.zip |
Revert "Split arel_table into method to get a relation and another to memoize the default relation."
This reverts commit bd51790895fc75a3b4e19e8dd7aa6dc389d77068.
Diffstat (limited to 'activerecord/lib/active_record/associations/has_many_association.rb')
-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 36a668c284..cd31b0e211 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -69,7 +69,7 @@ module ActiveRecord when :delete_all @reflection.klass.delete(records.map { |record| record.id }) else - relation = arel_table_for(@reflection.table_name) + relation = arel_table(@reflection.table_name) relation.conditions(relation[@reflection.primary_key_name].eq(@owner.id). and(Arel::Predicates::In.new(relation[@reflection.klass.primary_key], records.map(&:id))) ).update(relation[@reflection.primary_key_name] => nil) |