diff options
author | Greg Saks <greg@tapology.com> | 2014-01-26 14:21:05 -0500 |
---|---|---|
committer | Greg Saks <greg@tapology.com> | 2014-01-26 14:21:05 -0500 |
commit | 70588be101fd3bc6beecca08dc884823158968dc (patch) | |
tree | 8900309e2d701b372edf41e580f257b4eac248d1 /guides/source | |
parent | b5944928700cfc13ed8f615acb54116a3039f345 (diff) | |
download | rails-70588be101fd3bc6beecca08dc884823158968dc.tar.gz rails-70588be101fd3bc6beecca08dc884823158968dc.tar.bz2 rails-70588be101fd3bc6beecca08dc884823158968dc.zip |
Fix order syntax in find_by_sql example
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_record_querying.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 3783be50c0..d164b08d93 100644 --- a/guides/source/active_record_querying.md +++ b/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 ```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. |