aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/finder_methods.rb
diff options
context:
space:
mode:
authorsuginoy <suginoyasuhiro@gmail.com>2017-11-28 19:36:01 +0900
committersuginoy <suginoyasuhiro@gmail.com>2017-11-28 19:58:44 +0900
commit2c5acb20dd944cc061a03e8d1ca6d3e469c0d46e (patch)
treec50471f798df2756631774abd522d52272a466a8 /activerecord/lib/active_record/relation/finder_methods.rb
parent349f00beaa16f6b5eec3de7d3be8e9b72313a92f (diff)
downloadrails-2c5acb20dd944cc061a03e8d1ca6d3e469c0d46e.tar.gz
rails-2c5acb20dd944cc061a03e8d1ca6d3e469c0d46e.tar.bz2
rails-2c5acb20dd944cc061a03e8d1ca6d3e469c0d46e.zip
Update docs `ActiveRecord::FinderMethods#find`
ref https://github.com/rails/rails/pull/22653
Diffstat (limited to 'activerecord/lib/active_record/relation/finder_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 77c1367556..ff06ecbee1 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -18,9 +18,10 @@ module ActiveRecord
# Person.find([1]) # returns an array for the object with ID = 1
# Person.where("administrator = 1").order("created_on DESC").find(1)
#
- # NOTE: The returned records may not be in the same order as the ids you
- # provide since database rows are unordered. You will need to provide an explicit QueryMethods#order
- # option if you want the results to be sorted.
+ # NOTE: The returned records are in the same order as the ids you provide.
+ # If you want the results to be sorted by database, you can use ActiveRecord::QueryMethods#where
+ # method and provide an explicit ActiveRecord::QueryMethods#order option.
+ # But ActiveRecord::QueryMethods#where method doesn't raise ActiveRecord::RecordNotFound.
#
# ==== Find with lock
#