transaction do |transaction| david.withdrawal(100) mary.deposit(100) transaction.rollback! # rolls back the transaction that was otherwise going to be successful end
transaction do |transaction| david.withdrawal(100) mary.deposit(100) transaction.rollback! # rolls back the transaction that was otherwise going to be successful end