Fix typo

上级 14bd3282
......@@ -1609,7 +1609,7 @@ you get the instance method `find_by_first_name` for free from Active Record.
If you also have a `locked` field on the `Customer` model, you also get `find_by_locked` method.
You can specify an exclamation point (`!`) on the end of the dynamic finders
gto get them to raise an `ActiveRecord::RecordNotFound` error if they do not return any records, like `Customer.find_by_name!("Ryan")`
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.
For example, `Customer.find_by_first_name_and_orders_count("Ryan", 5)`.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册