It took me a surprsingly long to time learn how to do transactions in Rails. I assumed it would be dead simple (it is), but try googling for rails transactions. Useless. Especially when compared to something like hibernate transactions.
Anyway, this is how you do it: