Flowdock
method

associated_records_by_owner

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: Association
associated_records_by_owner(preloader) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/preloader/association.rb, line 60
          def associated_records_by_owner(preloader)
            records = load_records do |record|
              owner = owners_by_key[convert_key(record[association_key_name])]
              association = owner.association(reflection.name)
              association.set_inverse_instance(record)
            end

            owners.each_with_object({}) do |owner, result|
              result[owner] = records[convert_key(owner[owner_key_name])] || []
            end
          end
Register or log in to add new notes.