We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b594492 commit 70588beCopy full SHA for 70588be
guides/source/active_record_querying.md
@@ -1455,7 +1455,7 @@ If you'd like to use your own SQL to find records in a table you can use `find_b
1455
```ruby
1456
Client.find_by_sql("SELECT * FROM clients
1457
INNER JOIN orders ON clients.id = orders.client_id
1458
- ORDER clients.created_at desc")
+ ORDER BY clients.created_at desc")
1459
```
1460
1461
`find_by_sql` provides you with a simple way of making custom calls to the database and retrieving instantiated objects.
0 commit comments