提交 4a785415 编写于 作者: A Aaron Patterson

all records have a preloaded, so eliminate that conditional

上级 2075f39d
......@@ -52,17 +52,13 @@ def associated_records_by_owner(preloader)
r.send(source_reflection.name)
}.compact
if pl
loaded_records = pl.preloaded_records
i = 0
record_index = loaded_records.each_with_object({}) { |r,indexes|
indexes[r] = i
i += 1
}
rhs_records.sort_by { |rhs| record_index[rhs] }
else
rhs_records
end
loaded_records = pl.preloaded_records
i = 0
record_index = loaded_records.each_with_object({}) { |r,indexes|
indexes[r] = i
i += 1
}
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.
先完成此消息的编辑!
想要评论请 注册