提交 43a63f6d 编写于 作者: A Aaron Patterson

the preloader for the RHS has all the preloaded records, so ask it

上级 19b871a0
......@@ -29,6 +29,8 @@ def associated_records_by_owner(preloader)
source_reflection.name,
reflection_scope)
@preloaded_records.concat preloaders.flat_map(&:preloaded_records)
middle_to_pl = preloaders.each_with_object({}) do |pl,h|
pl.owners.each { |middle|
h[middle] = pl
......@@ -53,9 +55,7 @@ def associated_records_by_owner(preloader)
}.compact
record_index = pl_indexes[pl]
records = rhs_records.sort_by { |rhs| record_index[rhs] }
@preloaded_records.concat rhs_records
records
rhs_records.sort_by { |rhs| record_index[rhs] }
end
}
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册