diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-10-07 05:05:12 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-10-07 05:05:12 +0000 |
commit | cd64471bdbac70e2505cca9acb622332ebd3a5f9 (patch) | |
tree | 92e63bf40b5f182b2e346c8ffa509dafdd8dce22 /activerecord/lib | |
parent | 5a276643d163b675dea459071824deae3ebec9f2 (diff) | |
download | rails-cd64471bdbac70e2505cca9acb622332ebd3a5f9.tar.gz rails-cd64471bdbac70e2505cca9acb622332ebd3a5f9.tar.bz2 rails-cd64471bdbac70e2505cca9acb622332ebd3a5f9.zip |
Fix calling .clear on a has_many :dependent=>:delete_all association. [tarmo] Closes #6904
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 66ee712d7d..5598d6daa7 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -67,7 +67,7 @@ module ActiveRecord def clear return self if length.zero? # forces load_target if it hasn't happened already - if @reflection.options[:dependent] && @reflection.options[:dependent] == :delete_all + if @reflection.options[:dependent] && @reflection.options[:dependent] == :destroy destroy_all else delete_all |