Trying to figure out how concurrency is viewed in Ruby On Rails.
How to get a code segment to lock rows in the database and force rollback if necessary?
In particular, is there a way to force a certain segment of code to end and, if not rollback? . I want to add the transaction history to my project, and I do not want transactions to commit without saving the history, so if the server is between two actions (saving the transaction and saving the history), the database may go into an illegal state.
source
share