Class: RuboCop::Cop::G2::SafeConnectionHandling

Inherits:
Cop
  • Object
show all
Defined in:
lib/rubocop/cop/g2/safe_connection_handling.rb

Constant Summary collapse

MSG =
'ActiveRecord::Base should only be used to create an ApplicationRecord subclass.'.freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



11
12
13
14
# File 'lib/rubocop/cop/g2/safe_connection_handling.rb', line 11

def on_send(node)
  return unless safe_base_class?(node)
  add_offense(node)
end