DEV Community

Discussion on: How to use transactions to unclutter your Rails controllers

Collapse
 
mememe profile image
mememe • Edited

I was going to post the same thing. This can be handled by rails without the need of an additional gem.

Lead.transaction do
   # do something
end

Maybe I am missing something.

Collapse
 
mercier_remi profile image
Rémi Mercier

I thought that Lead.transaction - to use your example - only allowed me to wrap database operations as a single unit. With the dry-transaction it's more about any kind of operations. But maybe I am missing something.