diff options
Diffstat (limited to 'rubocop/cop/performance/active_record_subtransaction_methods.rb')
-rw-r--r-- | rubocop/cop/performance/active_record_subtransaction_methods.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/performance/active_record_subtransaction_methods.rb b/rubocop/cop/performance/active_record_subtransaction_methods.rb index 3b89d3ab858..1789e20ce45 100644 --- a/rubocop/cop/performance/active_record_subtransaction_methods.rb +++ b/rubocop/cop/performance/active_record_subtransaction_methods.rb @@ -5,7 +5,7 @@ module RuboCop module Performance # Cop that disallows certain methods that rely on subtransactions in their implementation. # Companion to Performance/ActiveRecordSubtransactions, which bans direct usage of subtransactions. - class ActiveRecordSubtransactionMethods < RuboCop::Cop::Cop + class ActiveRecordSubtransactionMethods < RuboCop::Cop::Base MSG = 'Methods that rely on subtransactions should not be used. ' \ 'For more information see: https://gitlab.com/gitlab-org/gitlab/-/issues/338346' @@ -21,7 +21,7 @@ module RuboCop def on_send(node) return unless DISALLOWED_METHODS.include?(node.method_name) - add_offense(node, location: :selector) + add_offense(node.loc.selector) end end end |