diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-03-30 15:23:37 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-03-30 15:23:37 -0300 |
commit | a4089576136aaec1366f87922ea9aebc03bfe3b1 (patch) | |
tree | 49f251311998ea8aaa0ea3f734d76fe268735eda /activerecord | |
parent | f9433ef26023174c9dc079441eb7d388f0625f34 (diff) | |
parent | 868816734d8cfe1e745d97512b2655da53688d23 (diff) | |
download | rails-a4089576136aaec1366f87922ea9aebc03bfe3b1.tar.gz rails-a4089576136aaec1366f87922ea9aebc03bfe3b1.tar.bz2 rails-a4089576136aaec1366f87922ea9aebc03bfe3b1.zip |
Merge pull request #19592 from adimitri/activerecord-find-ambiguity
Combine complementary AR #find doc lines
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 3f747a20b3..6a3a56f1cc 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -5,7 +5,7 @@ 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 no record can be found for all of the listed ids, then RecordNotFound will be raised. If the primary key + # 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+. # # Person.find(1) # returns the object for ID = 1 @@ -16,8 +16,6 @@ module ActiveRecord # Person.find([1]) # returns an array for the object with ID = 1 # Person.where("administrator = 1").order("created_on DESC").find(1) # - # <tt>ActiveRecord::RecordNotFound</tt> will be raised if one or more ids are not found. - # # NOTE: The returned records may not be in the same order as the ids you # provide since database rows are unordered. You'd need to provide an explicit <tt>order</tt> # option if you want the results are sorted. |