Skip to content

Commit

Permalink
Merge pull request #13846 from gsaks123/patch-1
Browse files Browse the repository at this point in the history
Fix order syntax in find_by_sql example [ci skip]
  • Loading branch information
robin850 committed Jan 26, 2014
2 parents b594492 + 70588be commit 61554ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/active_record_querying.md
Expand Up @@ -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 ```ruby
Client.find_by_sql("SELECT * FROM clients Client.find_by_sql("SELECT * FROM clients
INNER JOIN orders ON clients.id = orders.client_id 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. `find_by_sql` provides you with a simple way of making custom calls to the database and retrieving instantiated objects.
Expand Down

0 comments on commit 61554ef

Please sign in to comment.