diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-11-28 15:33:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 15:33:23 -0500 |
commit | 591c4a44580b0d6b5e43395061df9f5e8cfaee49 (patch) | |
tree | 62175bacd92ad598f06627657db381e7b4c198c2 | |
parent | 61214632f4a5d21ef86803740b6e30627e96c475 (diff) | |
parent | 2c5acb20dd944cc061a03e8d1ca6d3e469c0d46e (diff) | |
download | rails-591c4a44580b0d6b5e43395061df9f5e8cfaee49.tar.gz rails-591c4a44580b0d6b5e43395061df9f5e8cfaee49.tar.bz2 rails-591c4a44580b0d6b5e43395061df9f5e8cfaee49.zip |
Merge pull request #31254 from suginoy/update_doc_find_order
[ci skip]Update docs `ActiveRecord::FinderMethods#find`
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 7 |
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 # |