aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2015-03-27 17:55:19 +1030
committerMatthew Draper <matthew@trebex.net>2015-03-27 17:55:19 +1030
commit6ed8dc2172ab6f1c59de32cb6c81f1ba0cc4baae (patch)
tree9bf5163282e19765e6fe57dd36b5fb40d59173d7 /guides
parentc31c40208b16ee446ed69464792b5976e0ae8566 (diff)
parent2816494f5acdfb08d3b0fa54d91e2f41d9acbbe5 (diff)
downloadrails-6ed8dc2172ab6f1c59de32cb6c81f1ba0cc4baae.tar.gz
rails-6ed8dc2172ab6f1c59de32cb6c81f1ba0cc4baae.tar.bz2
rails-6ed8dc2172ab6f1c59de32cb6c81f1ba0cc4baae.zip
Merge pull request #19543 from mechanicles/fix-doc
Correct doc sentence [ci skip]
Diffstat (limited to 'guides')
-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")`