File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
activerecord/lib/active_record/relation Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ module FinderMethods
64
64
#
65
65
# Person.where(name: 'Spartacus', rating: 4).pluck(:field1, :field2)
66
66
# # returns an Array of the required fields.
67
+ #
68
+ # ==== Edge Cases
69
+ #
70
+ # Person.find(37) # raises ActiveRecord::RecordNotFound exception if the record with the given ID does not exist.
71
+ # Person.find([37]) # raises ActiveRecord::RecordNotFound exception if the record with the given ID in the input array does not exist.
72
+ # Person.find(nil) # raises ActiveRecord::RecordNotFound exception if the argument is nil.
73
+ # Person.find([]) # returns an empty array if the argument is an empty array.
74
+ # Person.find # raises ActiveRecord::RecordNotFound exception if the argument is not provided.
67
75
def find ( *args )
68
76
return super if block_given?
69
77
find_with_ids ( *args )
You can’t perform that action at this time.
0 commit comments