mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fixes generation of the AR querying guide
This commit is contained in:
parent
5912f3f97e
commit
3b5eb11664
1 changed files with 2 additions and 2 deletions
|
@ -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+:
|
||||
|
|
Loading…
Reference in a new issue