Skip to content

Commit

Permalink
Merge pull request #45013 from JohnAnon9771/fix/doc-active-record-que…
Browse files Browse the repository at this point in the history
…rying

Doc: fix of name attribute [ci-skip]
  • Loading branch information
jonathanhefner committed May 3, 2022
2 parents 1b884cf + 5d86ff8 commit 8bc187d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/active_record_querying.md
Expand Up @@ -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
Expand Down

0 comments on commit 8bc187d

Please sign in to comment.