diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 99259c25f28e4..ec62bd04d10ef 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -358,6 +358,8 @@ The SQL equivalent of the above is: SELECT * FROM customers WHERE (customers.first_name = 'Lifo') LIMIT 1 ``` +Note that there is no `ORDER BY` in the above SQL. If your `find_by` conditions can match multiple records, you should [apply an order](#ordering) to guarantee a deterministic result. + The [`find_by!`][] method behaves exactly like `find_by`, except that it will raise `ActiveRecord::RecordNotFound` if no matching record is found. For example: ```irb