class RuboCop::Cop::Rails::ApplicationRecord
end
# …
class Rails4Model < ActiveRecord::Base
# bad
end
# …
class Rails5Model < ApplicationRecord
# good
@example
Active Record models.
sneak into an Active Record model that is not purposed to inherit logic common among other
This cop’s autocorrection is unsafe because it may let the logic from ‘ApplicationRecord`
@safety
by default for this cop.
compatibility by avoiding loading any application code. And so migration files are excluded
It is a common practice to define models inside migrations in order to retain forward
Checks that models subclass `ApplicationRecord` with Rails 5.0.