aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-16 02:38:19 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-16 02:38:19 +0530
commit6c997c3c39094aa5df773d0808023031507ca627 (patch)
tree560e60beb0c5c6e3c31087090170f02037709d57 /activerecord
parentc5f3811a496065dbac6a165a85dca92a751a5ef0 (diff)
downloadrails-6c997c3c39094aa5df773d0808023031507ca627.tar.gz
rails-6c997c3c39094aa5df773d0808023031507ca627.tar.bz2
rails-6c997c3c39094aa5df773d0808023031507ca627.zip
Simplify Model.delete_all
Diffstat (limited to 'activerecord')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index a7936c18a3..4bacf2390b 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -937,7 +937,7 @@ module ActiveRecord #:nodoc:
# Both calls delete the affected posts all at once with a single DELETE statement. If you need to destroy dependent
# associations or call your <tt>before_*</tt> or +after_destroy+ callbacks, use the +destroy_all+ method instead.
def delete_all(conditions = nil)
- active_relation.where(construct_conditions(conditions, current_scoped_methods)).delete_all
+ where(conditions).delete_all
end
# Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part.