1
0
Fork 0
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:
Mehmet Emin INAC 2019-02-28 11:09:35 +01:00
parent 893c647da3
commit dedf7a2262
No known key found for this signature in database
GPG key ID: BFD6462A1DDCC607

View file

@ -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