Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Model.delete should just use scoped.delete

  • Loading branch information...
commit c5f3811a496065dbac6a165a85dca92a751a5ef0 1 parent 184ef28
@lifo lifo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/base.rb
View
2  activerecord/lib/active_record/base.rb
@@ -814,7 +814,7 @@ def update(id, attributes)
# # Delete multiple rows
# Todo.delete([2,3,4])
def delete(id_or_array)
- active_relation.where(construct_conditions(nil, current_scoped_methods)).delete(id_or_array)
+ scoped.delete(id_or_array)
end
# Destroy an object (or multiple objects) that has the given id, the object is instantiated first,
Please sign in to comment.
Something went wrong with that request. Please try again.