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 @@ -87,6 +87,14 @@ module FinderMethods
87
87
#
88
88
# Person.where(name: 'Spartacus', rating: 4).pluck(:field1, :field2)
89
89
# # returns an Array of the required fields.
90
+ #
91
+ # ==== Edge Cases
92
+ #
93
+ # Person.find(37) # raises ActiveRecord::RecordNotFound exception if the record with the given ID does not exist.
94
+ # Person.find([37]) # raises ActiveRecord::RecordNotFound exception if the record with the given ID in the input array does not exist.
95
+ # Person.find(nil) # raises ActiveRecord::RecordNotFound exception if the argument is nil.
96
+ # Person.find([]) # returns an empty array if the argument is an empty array.
97
+ # Person.find # raises ActiveRecord::RecordNotFound exception if the argument is not provided.
90
98
def find ( *args )
91
99
return super if block_given?
92
100
find_with_ids ( *args )
You can’t perform that action at this time.
0 commit comments