提交 dbdaf757 编写于 作者: A Aaron Patterson

just push on to the scope chain items. Oops! (thanks @carlosantoniodasilva)

上级 5b83f46a
......@@ -106,10 +106,9 @@ def join_to(manager)
end
if reflection.type
scope_chain_items.concat [
scope_chain_items <<
ActiveRecord::Relation.new(reflection.klass, table)
.where(reflection.type => foreign_klass.base_class.name)
]
end
scope_chain_items.concat [reflection.klass.send(:build_default_scope)].compact
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册