aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantosh Wadghule <santosh.wadghule@gmail.com>2015-03-27 12:01:35 +0530
committerSantosh Wadghule <santosh.wadghule@gmail.com>2015-03-27 12:25:58 +0530
commit2816494f5acdfb08d3b0fa54d91e2f41d9acbbe5 (patch)
treeb24bc70e4b7517e23769fa2c4ad05ed11428d5c2
parente1b967e7e0edc0f59b49558d2c3d4afd9125a59f (diff)
downloadrails-2816494f5acdfb08d3b0fa54d91e2f41d9acbbe5.tar.gz
rails-2816494f5acdfb08d3b0fa54d91e2f41d9acbbe5.tar.bz2
rails-2816494f5acdfb08d3b0fa54d91e2f41d9acbbe5.zip
Correct doc sentence [ci skip]
-rw-r--r--guides/source/active_record_querying.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index bef903b751..d6f3506aa5 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -1343,7 +1343,7 @@ Client.unscoped {
Dynamic Finders
---------------
-For every field (also known as an attribute) you define in your table, Active Record provides a finder method. If you have a field called `first_name` on your `Client` model for example, you get `find_by_first_name` for free from Active Record. If you have a `locked` field on the `Client` model, you also get `find_by_locked` and methods.
+For every field (also known as an attribute) you define in your table, Active Record provides a finder method. If you have a field called `first_name` on your `Client` model for example, you get `find_by_first_name` for free from Active Record. If you have a `locked` field on the `Client` model, you also get `find_by_locked` method.
You can specify an exclamation point (`!`) on the end of the dynamic finders to get them to raise an `ActiveRecord::RecordNotFound` error if they do not return any records, like `Client.find_by_name!("Ryan")`