From 5cd8818258cf7ce2c90667076d3f61f1c7ed548e Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sun, 27 Dec 2009 19:22:18 +0530 Subject: Make Model.destroy_all use new finders --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/base.rb') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 0d3ae1ef3e..a3b123c463 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -914,7 +914,7 @@ module ActiveRecord #:nodoc: # Person.destroy_all("last_login < '2004-04-04'") # Person.destroy_all(:status => "inactive") def destroy_all(conditions = nil) - find(:all, :conditions => conditions).each { |object| object.destroy } + where(conditions).each {|object| object.destroy } end # Deletes the records matching +conditions+ without instantiating the records first, and hence not -- cgit v1.2.3