From bb4c6797bf83a7f31b490e3172fd8e17c2c6ca5a Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Mon, 3 Apr 2006 22:37:56 +0000 Subject: Fixed that AssociationCollection#delete_all should work even if the records of the association are not loaded yet. [Florian Weber] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4144 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/associations/association_collection.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 8e249d1b94..268452f422 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -37,6 +37,7 @@ module ActiveRecord # Remove all records from this association def delete_all + load_target delete(@target) @target = [] end -- cgit v1.2.3