mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #13846 from gsaks123/patch-1
Fix order syntax in find_by_sql example [ci skip]
This commit is contained in:
commit
61554efd02
1 changed files with 1 additions and 1 deletions
|
@ -1455,7 +1455,7 @@ If you'd like to use your own SQL to find records in a table you can use `find_b
|
|||
```ruby
|
||||
Client.find_by_sql("SELECT * FROM clients
|
||||
INNER JOIN orders ON clients.id = orders.client_id
|
||||
ORDER clients.created_at desc")
|
||||
ORDER BY clients.created_at desc")
|
||||
```
|
||||
|
||||
`find_by_sql` provides you with a simple way of making custom calls to the database and retrieving instantiated objects.
|
||||
|
|
Loading…
Reference in a new issue