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/database/multiple_databases.rb')
-rw-r--r--rubocop/cop/database/multiple_databases.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/database/multiple_databases.rb b/rubocop/cop/database/multiple_databases.rb
index 1ac9bb4473b..33ff8acd4d8 100644
--- a/rubocop/cop/database/multiple_databases.rb
+++ b/rubocop/cop/database/multiple_databases.rb
@@ -10,7 +10,7 @@ module RuboCop
# # good
# ApplicationRecord.connection
#
- class MultipleDatabases < RuboCop::Cop::Cop
+ class MultipleDatabases < RuboCop::Cop::Base
AR_BASE_MESSAGE = <<~EOF
Do not use methods from ActiveRecord::Base, use the ApplicationRecord class instead
For fixing offenses related to the ActiveRecord::Base.transaction method, see our guidelines:
@@ -32,7 +32,7 @@ module RuboCop
active_record_base_method = node.children[1]
return if method_is_allowed?(active_record_base_method)
- add_offense(node, location: :expression, message: AR_BASE_MESSAGE)
+ add_offense(node, message: AR_BASE_MESSAGE)
end
private