diff options
author | Swanand Pagnis <swanand.pagnis@gmail.com> | 2012-03-05 18:54:34 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-03-09 00:21:56 +0530 |
commit | 30feb8c816a7314b69530bf383d6cacce4a602c2 (patch) | |
tree | b7665f81e6d232f40067a43ec445bfc00fd7e1e6 /railties/guides | |
parent | 1f2224da7751017767fa9bf5ad52e12ee5489801 (diff) | |
download | rails-30feb8c816a7314b69530bf383d6cacce4a602c2.tar.gz rails-30feb8c816a7314b69530bf383d6cacce4a602c2.tar.bz2 rails-30feb8c816a7314b69530bf383d6cacce4a602c2.zip |
Fixed a slightly misleading equivalent SQL code on the 3.2 query interface.
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/source/active_record_querying.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index e46410ce59..d9d7d38db5 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/railties/guides/source/active_record_querying.textile @@ -94,7 +94,7 @@ client = Client.find(10) The SQL equivalent of the above is: <sql> -SELECT * FROM clients WHERE (clients.id = 10) +SELECT * FROM clients WHERE (clients.id = 10) LIMIT 1 </sql> <tt>Model.find(primary_key)</tt> will raise an +ActiveRecord::RecordNotFound+ exception if no matching record is found. |