From dedf7a226285e6ce5036619ab23c8994979332a0 Mon Sep 17 00:00:00 2001 From: Mehmet Emin INAC Date: Thu, 28 Feb 2019 11:09:35 +0100 Subject: [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. --- activerecord/lib/active_record/relation/finder_methods.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 91cfc4e849..2b5b77cd56 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -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 -- cgit v1.2.3