diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index 8ea06d28aa..4e77a6e803 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/railties/guides/source/active_record_querying.textile @@ -560,6 +560,7 @@ Client.where("orders_count > 10").order(:name).reverse_order The SQL that would be executed: + SELECT * FROM clients WHERE orders_count > 10 ORDER BY name DESC @@ -571,6 +572,7 @@ Client.where("orders_count > 10").reverse_order The SQL that would be executed: + SELECT * FROM clients WHERE orders_count > 10 ORDER BY clients.id DESC @@ -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+. -
- This behavior can be turned off by setting ActiveRecord::Base.lock_optimistically = false. To override the name of the +lock_version+ column, +ActiveRecord::Base+ provides a class method called +set_locking_column+: