diff options
Diffstat (limited to 'rubocop/cop/avoid_becomes.rb')
-rw-r--r-- | rubocop/cop/avoid_becomes.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/avoid_becomes.rb b/rubocop/cop/avoid_becomes.rb index cfd6b3d2164..20df394c32c 100644 --- a/rubocop/cop/avoid_becomes.rb +++ b/rubocop/cop/avoid_becomes.rb @@ -9,7 +9,7 @@ module RuboCop # problems, even when a developer eager loaded all necessary associations. # # See https://gitlab.com/gitlab-org/gitlab/-/issues/23182 for more information. - class AvoidBecomes < RuboCop::Cop::Cop + class AvoidBecomes < RuboCop::Cop::Base MSG = 'Avoid the use of becomes(SomeConstant), as this creates a ' \ 'new object and throws away any eager loaded associations. ' \ 'When creating URLs in views, just use the path helpers directly. ' \ @@ -23,7 +23,7 @@ module RuboCop PATTERN def on_send(node) - add_offense(node, location: :expression) if becomes?(node) + add_offense(node) if becomes?(node) end end end |