提交 465736bf 编写于 作者: R Rafael Mendonça França

Merge pull request #15229 from peeyushsingla/master

fixes in active record query for reorder in rails guides
......@@ -753,13 +753,13 @@ Post.find(10).comments.reorder('name')
The SQL that would be executed:
```sql
SELECT * FROM posts WHERE id = 10 ORDER BY name
SELECT * FROM comments WHERE post_id = 10 ORDER BY name
```
In case the `reorder` clause is not used, the SQL executed would be:
```sql
SELECT * FROM posts WHERE id = 10 ORDER BY posted_at DESC
SELECT * FROM comments WHERE post_id = 10 ORDER BY posted_at DESC
```
### `reverse_order`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册