ActiveRecord::Base.transaction do
  savings.withdrawal(100)
  checking.deposit(100)
end

If any exceptions are raised, the entire operation is rolled back on the database layer and nothing will be committed to the database.