Active Record transaction callbacks | Greg Molnar
19-Apr-2024 699
Active Record introduced transaction callbacks recently. This change allows you to have a callback for the whole transaction, rather than to just have callbacks on a record’s after_commit event. To make this possible, ActiveRecord::Base.transaction yields a transaction object now and the callback.
Active Record transaction callbacks | Greg Molnar #ruby #rubydeveloper #rubyonrails #Active #Record #transaction #callbacks #Molnar #active #callbacks #record https://rubyonrails.ba/link/active-record-transaction-callbacks-greg-molnar