my_account = Account.find 3your_account = Account.find 4Account.transaction do my_account.update_attribute(:balance, my_account.balance-300.00) your_account.update_attribute(:balance, your_account.balance+300.00)end