Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'rubocop/cop/destroy_all.rb')
-rw-r--r--rubocop/cop/destroy_all.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/destroy_all.rb b/rubocop/cop/destroy_all.rb
index 38b6cb40f91..78e5d0f25f3 100644
--- a/rubocop/cop/destroy_all.rb
+++ b/rubocop/cop/destroy_all.rb
@@ -3,7 +3,7 @@
module RuboCop
module Cop
# Cop that blacklists the use of `destroy_all`.
- class DestroyAll < RuboCop::Cop::Cop
+ class DestroyAll < RuboCop::Cop::Base
MSG = 'Use `delete_all` instead of `destroy_all`. ' \
'`destroy_all` will load the rows into memory, then execute a ' \
'`DELETE` for every individual row.'
@@ -15,7 +15,7 @@ module RuboCop
def on_send(node)
return unless destroy_all?(node)
- add_offense(node, location: :expression)
+ add_offense(node)
end
end
end