aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorFlorian Weber <csshsh@gmail.com>2006-04-03 22:37:56 +0000
committerFlorian Weber <csshsh@gmail.com>2006-04-03 22:37:56 +0000
commitbb4c6797bf83a7f31b490e3172fd8e17c2c6ca5a (patch)
tree9684ce5072516735eec31b18c3f7656f0abbf1bf /activerecord/lib
parent109c56df3afdae0235757edad885b829b4b8a716 (diff)
downloadrails-bb4c6797bf83a7f31b490e3172fd8e17c2c6ca5a.tar.gz
rails-bb4c6797bf83a7f31b490e3172fd8e17c2c6ca5a.tar.bz2
rails-bb4c6797bf83a7f31b490e3172fd8e17c2c6ca5a.zip
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
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/association_collection.rb1
1 files changed, 1 insertions, 0 deletions
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