mirror of https://github.com/rails/rails
fixes generation of the AR querying guide
This commit is contained in:
parent
5912f3f97e
commit
3b5eb11664
|
@ -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 New Issue