Skip to content

Commit 70588be

Browse files
committed
Fix order syntax in find_by_sql example
1 parent b594492 commit 70588be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/active_record_querying.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ If you'd like to use your own SQL to find records in a table you can use `find_b
14551455
```ruby
14561456
Client.find_by_sql("SELECT * FROM clients
14571457
INNER JOIN orders ON clients.id = orders.client_id
1458-
ORDER clients.created_at desc")
1458+
ORDER BY clients.created_at desc")
14591459
```
14601460

14611461
`find_by_sql` provides you with a simple way of making custom calls to the database and retrieving instantiated objects.

0 commit comments

Comments
 (0)