aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorHanfei Shen <qqshfox@gmail.com>2013-02-19 00:41:09 +0800
committerHanfei Shen <qqshfox@gmail.com>2013-02-19 00:41:09 +0800
commit8743f800db529ef21a757b70230527fdae0691cc (patch)
tree8bf606a5fddb5f1c03cc6b08354e6edab6c264c6 /guides
parent72118ba01db23f83e2cb88d6f690e243e50c5145 (diff)
downloadrails-8743f800db529ef21a757b70230527fdae0691cc.tar.gz
rails-8743f800db529ef21a757b70230527fdae0691cc.tar.bz2
rails-8743f800db529ef21a757b70230527fdae0691cc.zip
Update guides/source/active_record_querying.md
Fix missing `ORDER BY id ASC` for Client.first(2); UppercaseĀ the little y in the SQL equivalent of the Client.last(2).
Diffstat (limited to 'guides')
-rw-r--r--guides/source/active_record_querying.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index 62d6294ae5..226c1f1475 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -299,7 +299,7 @@ Client.first(2)
The SQL equivalent of the above is:
```sql
-SELECT * FROM clients LIMIT 2
+SELECT * FROM clients ORDER BY id ASC LIMIT 2
```
#### last
@@ -315,7 +315,7 @@ Client.last(2)
The SQL equivalent of the above is:
```sql
-SELECT * FROM clients ORDER By id DESC LIMIT 2
+SELECT * FROM clients ORDER BY id DESC LIMIT 2
```
### Retrieving Multiple Objects in Batches