diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-04 19:00:26 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-04 19:00:26 -0700 |
commit | 80a292cbd9d32ed87333b58b36618cfda8d4b95a (patch) | |
tree | b6b195a5c237da512a311de1a083d13152d75dd3 /activerecord/lib | |
parent | efb054baa0e8e5a1ebebbfc307f69bf846ceee89 (diff) | |
parent | 4657dba60eebc0d7cea11ffd18aa70d7a3d00e45 (diff) | |
download | rails-80a292cbd9d32ed87333b58b36618cfda8d4b95a.tar.gz rails-80a292cbd9d32ed87333b58b36618cfda8d4b95a.tar.bz2 rails-80a292cbd9d32ed87333b58b36618cfda8d4b95a.zip |
Merge pull request #6128 from frodsan/delete_all_limit_32
Fix #4979 against 3-2-stable
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 8c56072337..4b3b30d6ed 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -403,6 +403,8 @@ module ActiveRecord # 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) + raise ActiveRecordError.new("delete_all doesn't support limit scope") if self.limit_value + IdentityMap.repository[symbolized_base_class] = {} if IdentityMap.enabled? if conditions where(conditions).delete_all |