diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /rubocop/cop/ignored_columns.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'rubocop/cop/ignored_columns.rb')
-rw-r--r-- | rubocop/cop/ignored_columns.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rubocop/cop/ignored_columns.rb b/rubocop/cop/ignored_columns.rb index 4a6f1e4f2d9..542d78c59e9 100644 --- a/rubocop/cop/ignored_columns.rb +++ b/rubocop/cop/ignored_columns.rb @@ -3,7 +3,7 @@ module RuboCop module Cop # Cop that blacklists the usage of `ActiveRecord::Base.ignored_columns=` directly - class IgnoredColumns < RuboCop::Cop::Cop + class IgnoredColumns < RuboCop::Cop::Base USE_CONCERN_MSG = 'Use `IgnoredColumns` concern instead of adding to `self.ignored_columns`.' WRONG_MODEL_MSG = 'If the model exists in CE and EE, the column has to be ignored ' \ 'in the CE model. If the model only exists in EE, then it has to be added there.' @@ -22,11 +22,11 @@ module RuboCop def on_send(node) if ignored_columns?(node) - add_offense(node, location: :expression, message: USE_CONCERN_MSG) + add_offense(node, message: USE_CONCERN_MSG) end if using_ignore?(node) && used_in_wrong_model? - add_offense(node, location: :expression, message: WRONG_MODEL_MSG) + add_offense(node, message: WRONG_MODEL_MSG) end end |