Skip to content

Commit

Permalink
fix: name of attribute of name to first_name in dynamic finders doc
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAnon9771 committed May 3, 2022
1 parent 1b884cf commit 5d86ff8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/active_record_querying.md
Original file line number Diff line number Diff line change
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 5d86ff8

Please sign in to comment.