Since Rails 5, domain models inherit from ApplicationRecord by default.
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.
Posted by Arne Hartherz to makandra dev (2017-06-14 19:55)