fixes generation of the AR querying guide

This commit is contained in:
Xavier Noria 2011-08-17 14:37:27 -07:00
parent 5912f3f97e
commit 3b5eb11664
1 changed files with 2 additions and 2 deletions

View File

@ -560,6 +560,7 @@ Client.where("orders_count > 10").order(:name).reverse_order
</ruby>
The SQL that would be executed:
<sql>
SELECT * FROM clients WHERE orders_count > 10 ORDER BY name DESC
</sql>
@ -571,6 +572,7 @@ Client.where("orders_count > 10").reverse_order
</ruby>
The SQL that would be executed:
<sql>
SELECT * FROM clients WHERE orders_count > 10 ORDER BY clients.id DESC
</sql>
@ -621,8 +623,6 @@ You're then responsible for dealing with the conflict by rescuing the exception
NOTE: You must ensure that your database schema defaults the +lock_version+ column to +0+.
<br />
This behavior can be turned off by setting <tt>ActiveRecord::Base.lock_optimistically = false</tt>.
To override the name of the +lock_version+ column, +ActiveRecord::Base+ provides a class method called +set_locking_column+: