mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] Fix the documentation of ActiveRecord::FinderMethods#find
It's mentioned everywhere as `ActiveRecord::RecordNotFound` so to be coherent with the rest of the documentation I've applied it here. Also doc was saying if the parameter is integer it coerces it which is other way around.
This commit is contained in:
parent
893c647da3
commit
dedf7a2262
1 changed files with 2 additions and 2 deletions
|
@ -7,8 +7,8 @@ module ActiveRecord
|
|||
ONE_AS_ONE = "1 AS one"
|
||||
|
||||
# Find by id - This can either be a specific id (1), a list of ids (1, 5, 6), or an array of ids ([5, 6, 10]).
|
||||
# If one or more records can not be found for the requested ids, then RecordNotFound will be raised. If the primary key
|
||||
# is an integer, find by id coerces its arguments using +to_i+.
|
||||
# If one or more records can not be found for the requested ids, then ActiveRecord::RecordNotFound will be raised.
|
||||
# If the primary key is not an integer, find by id coerces its arguments using +to_i+.
|
||||
#
|
||||
# Person.find(1) # returns the object for ID = 1
|
||||
# Person.find("1") # returns the object for ID = 1
|
||||
|
|
Loading…
Reference in a new issue