Permalink
Browse files

Merge pull request #26412 from rails/revert-26410-rm-dups

Revert " [ci skip] Remove duplicate example."
  • Loading branch information...
guilleiguaran committed Sep 6, 2016
2 parents 61c96d6 + 33a7eed commit f55a2431cfd55ad1e9dc92a9bc68a68dc5446f8d
Showing with 5 additions and 0 deletions.
  1. +5 −0 activerecord/lib/active_record/associations/collection_proxy.rb
@@ -107,6 +107,11 @@ def loaded?
# # #<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

0 comments on commit f55a243

Please sign in to comment.