method
through_records_for
v3.2.1 -
Show latest stable
- Class:
ActiveRecord::Associations::HasManyThroughAssociation
through_records_for(record)private
No documentation available.
# File activerecord/lib/active_record/associations/has_many_through_association.rb, line 147
def through_records_for(record)
attributes = construct_join_attributes(record)
candidates = Array.wrap(through_association.target)
candidates.find_all { |c| c.attributes.slice(*attributes.keys) == attributes }
end