diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-02-28 18:16:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-28 18:16:13 +0100 |
commit | 81710da41c2efac1d04868579d0b71f578f3f539 (patch) | |
tree | 99b69dd628306370e9b2d75490680b4a6b7a787b /activerecord/lib/active_record/relation | |
parent | 0c5486aa4d789bafe36b200e9c9d4507b3c20c89 (diff) | |
parent | f98bb46543c6a1e180468066debca84a5f9af7ce (diff) | |
download | rails-81710da41c2efac1d04868579d0b71f578f3f539.tar.gz rails-81710da41c2efac1d04868579d0b71f578f3f539.tar.bz2 rails-81710da41c2efac1d04868579d0b71f578f3f539.zip |
Merge pull request #35435 from meinac/fix_recently_added_wrong_doc
[ci skip] The `find` method coerces the given arguments to integer if the `primary key` is integer
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 2b5b77cd56..74f323a278 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -8,7 +8,7 @@ module ActiveRecord # 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 ActiveRecord::RecordNotFound will be raised. - # If the primary key is not an integer, find by id coerces its arguments using +to_i+. + # If the primary key is an integer, find by id coerces its arguments by using +to_i+. # # Person.find(1) # returns the object for ID = 1 # Person.find("1") # returns the object for ID = 1 |