From cbde6f56aed9119585de734de56056211aad36f5 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Thu, 13 Jun 2013 23:30:14 +0530 Subject: [PATCH] Added an example of the query without except before the example with except --- guides/source/active_record_querying.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 84fc2542071fc..2555927d152c6 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -687,6 +687,10 @@ The SQL that would be executed: ```sql SELECT * FROM posts WHERE id > 10 LIMIT 20 + +# Original query without `except` +SELECT * FROM posts WHERE id > 10 ORDER BY id asc LIMIT 20 + ``` ### `unscope` @@ -722,6 +726,10 @@ The SQL that would be executed: ```sql SELECT * FROM posts WHERE id > 10 ORDER BY id DESC + +# Original query without `only` +SELECT "posts".* FROM "posts" WHERE (id > 10) ORDER BY id desc LIMIT 20 + ``` ### `reorder`