From fd7dc8fa3d79024b109067530f64e6a722732ae9 Mon Sep 17 00:00:00 2001 From: Jonathan Hefner Date: Tue, 3 May 2022 15:52:09 -0500 Subject: [PATCH] Merge pull request #45013 from JohnAnon9771/fix/doc-active-record-querying Doc: fix of name attribute [ci-skip] (cherry picked from commit 8bc187dbcc206c0846255cd9809d620c877cc920) --- guides/source/active_record_querying.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index ed1c0e4281b84..244f4e22b1564 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1811,7 +1811,7 @@ If you also have a `locked` field on the `Customer` model, you also get `find_by 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 `Customer.find_by_name!("Ryan")` -If you want to find both by `name` and `orders_count`, you can chain these finders together by simply typing "`and`" between the fields. +If you want to find both by `first_name` and `orders_count`, you can chain these finders together by simply typing "`and`" between the fields. For example, `Customer.find_by_first_name_and_orders_count("Ryan", 5)`. Enums