Transaction blocks and rollbacks

The simplest way is:

raise ActiveRecord::Rollback

which will roll the whole transaction it's executed inside of back.

--Matt Jones