提交 9eca11a4 编写于 作者: A Aaron Patterson

porting 06651829 to master. Thanks Marcelo Giorgi

上级 bee447a5
......@@ -279,7 +279,7 @@ def preload_through_records(records, reflection, through_association)
end
else
options = {}
options[:include] = reflection.options[:include] || reflection.options[:source] if reflection.options[:conditions]
options[:include] = reflection.options[:include] || reflection.options[:source] if reflection.options[:conditions] || reflection.options[:order]
options[:order] = reflection.options[:order]
options[:conditions] = reflection.options[:conditions]
records.first.class.preload_associations(records, through_association, options)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册