module ActiveRecord::Transactions
def add_to_transaction(ensure_finalize = true)
Add the record to the current transaction so that the #after_rollback and #after_commit
def add_to_transaction(ensure_finalize = true) self.class.with_connection do |connection| connection.add_transaction_record(self, ensure_finalize) end end