Skip to content

Commit

Permalink
Simplify Model.delete_all
Browse files Browse the repository at this point in the history
  • Loading branch information
lifo committed Jan 15, 2010
1 parent c5f3811 commit 6c997c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/base.rb
Expand Up @@ -937,7 +937,7 @@ def destroy_all(conditions = nil)
# 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.
Expand Down

0 comments on commit 6c997c3

Please sign in to comment.