ActiveRecord anti-patterns which you should avoid: Part 2. Callbacks
What are they? ActiveRecord callback is a tricky Rails-way method to trigger some code in different phases of persisting model object. Example: class Order < ApplicationRecord before_save :set_total after_commit :send_order_confirmation, on: :cre...
