diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-16 02:35:53 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-16 02:35:53 +0530 |
commit | c5f3811a496065dbac6a165a85dca92a751a5ef0 (patch) | |
tree | e43a32bfd33dab6854c87de47dfa6db2474529c5 /activerecord/lib/active_record | |
parent | 184ef28f55bb576e1eaebf915f8ce64aa8823e90 (diff) | |
download | rails-c5f3811a496065dbac6a165a85dca92a751a5ef0.tar.gz rails-c5f3811a496065dbac6a165a85dca92a751a5ef0.tar.bz2 rails-c5f3811a496065dbac6a165a85dca92a751a5ef0.zip |
Model.delete should just use scoped.delete
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 2eb8700bd7..a7936c18a3 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -814,7 +814,7 @@ module ActiveRecord #:nodoc: # # 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, |