Since Rails 5, domain models inherit from ApplicationRecord by default.
ApplicationRecord
Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!
This is the place to put code that should be available in all your application's models. There is no reason to monkey-patch ActiveRecord::Base when following that practice.
ActiveRecord::Base