class Rubocop::Cop::Rails::HasAndBelongsToMany

This cop checks for the use of the has_and_belongs_to_many macro.

def on_send(node)

def on_send(node)
  receiver, method_name, *_args = *node
  if receiver.nil? && method_name == :has_and_belongs_to_many
    convention(node, :selector)
  end
end