Fixed what looks like minor cut/paste error in documentation for ActiveRecord::Locking:Pessimistic
This commit is contained in:
John Paul Ashenfelter 2011-05-19 01:20:26 -04:00
parent b13d24e5b9
commit 3b18e900e8

@ -14,7 +14,7 @@ module Locking
# Account.transaction do
# # select * from accounts where name = 'shugo' limit 1 for update
# shugo = Account.where("name = 'shugo'").lock(true).first
# yuko = Account.where("name = 'shugo'").lock(true).first
# yuko = Account.where("name = 'yuko'").lock(true).first
# shugo.balance -= 100
# shugo.save!
# yuko.balance += 100