aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-08-17 14:37:27 -0700
committerXavier Noria <fxn@hashref.com>2011-08-17 14:41:49 -0700
commit3b5eb11664b8257d35dced58f1d65e34fa4a6c1f (patch)
tree9cee0f6bca49034e68fef6e6f7614a5b87a16d66
parent5912f3f97e05862958f6b5383586a791491cdf6e (diff)
downloadrails-3b5eb11664b8257d35dced58f1d65e34fa4a6c1f.tar.gz
rails-3b5eb11664b8257d35dced58f1d65e34fa4a6c1f.tar.bz2
rails-3b5eb11664b8257d35dced58f1d65e34fa4a6c1f.zip
fixes generation of the AR querying guide
-rw-r--r--railties/guides/source/active_record_querying.textile4
1 files changed, 2 insertions, 2 deletions
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
</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+: