diff options
| author | Vipul A M <vipulnsward@gmail.com> | 2016-09-06 23:24:11 +0530 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-06 23:24:11 +0530 | 
| commit | 33a7eedc01a54c685723ad5a7795e332a5132ca1 (patch) | |
| tree | 7783166050ad5f3ac9920d75b46632bed2c81a13 /activerecord/lib | |
| parent | 61c96d66b2c60114b19a3d8fe021699a222157ea (diff) | |
| download | rails-33a7eedc01a54c685723ad5a7795e332a5132ca1.tar.gz rails-33a7eedc01a54c685723ad5a7795e332a5132ca1.tar.bz2 rails-33a7eedc01a54c685723ad5a7795e332a5132ca1.zip | |
Revert " [ci skip] Remove duplicate example."
Diffstat (limited to 'activerecord/lib')
| -rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 1302f3c7e4..dda240585e 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -107,6 +107,11 @@ module ActiveRecord        #   #      #<Pet id: 3, name: "Choo-Choo", person_id: 1>        #   #    ]        # +      #   person.pets.select(:name) { |pet| pet.name =~ /oo/ } +      #   # => [ +      #   #      #<Pet id: 2, name: "Spook">, +      #   #      #<Pet id: 3, name: "Choo-Choo"> +      #   #    ]        # Finds an object in the collection responding to the +id+. Uses the same        # rules as ActiveRecord::Base.find. Returns ActiveRecord::RecordNotFound | 
