Listen to lifecycle events for ActiveRecord models