Skip to content
Browse files

mention that coercion only happens when the primary key is an integer…

… and use +to_i+ formatting
  • Loading branch information...
1 parent 859a91b commit dcb2279674fef7358c894445c9cd7c4827b90b10 @raganwald raganwald committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/relation/finder_methods.rb
View
4 activerecord/lib/active_record/relation/finder_methods.rb
@@ -6,8 +6,8 @@ module FinderMethods
# Find operates with four different retrieval approaches:
#
# * 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 no record can be found for all of the listed ids, then RecordNotFound will be raised. Find by id coerces
- # its arguments to integers using #to_i.
+ # If no record can be found for all of the listed ids, then RecordNotFound will be raised. If the primary key
+ # is an integer, find by id coerces its arguments using +to_i+.
# * Find first - This will return the first record matched by the options used. These options can either be specific
# conditions or merely an order. If no record can be matched, +nil+ is returned. Use
# <tt>Model.find(:first, *args)</tt> or its shortcut <tt>Model.first(*args)</tt>.

0 comments on commit dcb2279

Please sign in to comment.
Something went wrong with that request. Please try again.