1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Improve wording on find_by note regarding returning only one record [ci skip]

This commit is contained in:
Konstantinos Rousis 2015-02-21 14:58:59 +01:00
parent 56e788edb3
commit 793ff7585b

View file

@ -1403,8 +1403,9 @@ WHERE people.name = 'John'
LIMIT 1
```
NOTE: Remember that, if `find_by` returns more than one registry, it will take
just the first and ignore the others. Note the `LIMIT 1` statement above.
NOTE: Note that if a query matches multiple records, `find_by` will
fetch only the first one and ignore the others (see the `LIMIT 1`
statement above).
Find or Build a New Object
--------------------------