diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2014-01-26 11:23:50 -0800 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2014-01-26 11:23:50 -0800 |
commit | 61554efd02949c1de6e8a7be1c0e58a92a45bcb2 (patch) | |
tree | 8900309e2d701b372edf41e580f257b4eac248d1 | |
parent | b5944928700cfc13ed8f615acb54116a3039f345 (diff) | |
parent | 70588be101fd3bc6beecca08dc884823158968dc (diff) | |
download | rails-61554efd02949c1de6e8a7be1c0e58a92a45bcb2.tar.gz rails-61554efd02949c1de6e8a7be1c0e58a92a45bcb2.tar.bz2 rails-61554efd02949c1de6e8a7be1c0e58a92a45bcb2.zip |
Merge pull request #13846 from gsaks123/patch-1
Fix order syntax in find_by_sql example [ci skip]
-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. |