提交 a513f8f8 编写于 作者: M Marcelo Giorgi 提交者: Mikel Lindsaar

intersection between a relation and an array works in both directions

Signed-off-by: NMikel Lindsaar <raasdnil@gmail.com>
上级 1c283765
......@@ -5,6 +5,7 @@ module SpawnMethods
def merge(r)
merged_relation = clone
return merged_relation unless r
return to_a & r if r.is_a?(Array)
Relation::ASSOCIATION_METHODS.each do |method|
value = r.send(:"#{method}_values")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册