ActiveRecord Transactions
suggest changeRemarks
Transactions are protective blocks where SQL statements are kept only if they all succeed as one atomic action. The classic example is a transfer between two accounts: the deposit is kept only if the withdrawal succeeded, and the other way around. Transactions protect database integrity against program errors or database breakdowns. Use a transaction block whenever several statements must run together or not at all.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents