find(*args, &block)
Instance Public methods
Finds an object in the collection responding to the id. Uses
the same rules as ActiveRecord::Base.find. Returns
ActiveRecord::RecordNotFound error if the object cannot be
found.
class Person < ActiveRecord::Base
has_many :pets
end
person.pets
# => [
# #<Pet id: 1, name: "Fancy-Fancy", person_id: 1>,
# #<Pet id: 2, name: "Spook", person_id: 1>,
# #<Pet id: 3, name: "Choo-Choo", person_id: 1>