Introduction to Rails transactions
13-Oct-2021 1137
Transactions are an essential part of the Rails framework. Even if you are not using them directly, Rails is doing it automatically each time you save or destroy the instance of the model. However, while transactions can bring you many benefits, they can also damage your application when used in a not proper way. This article introduces transactions and will help you use them wisely, even if you haven’t used them before.Wait, but do I need to use transactions in my application? The answer is: it depends. If you do many SQL queries that rely on each other in your application, then the knowledge of transactions is a must-have. Otherwise, it is always good to know how things are working before you need them.
Introduction to Rails transactions #ruby #rubydeveloper #rubyonrails #Introduction #Rails #transactions https://rubyonrails.ba/link/introduction-to-rails-transactions