提交 cf5f55cd 编写于 作者: K Kasper Timm Hansen 提交者: GitHub

Merge pull request #26380 from kamipo/pass_set_inverse_instance_block

Pass `set_inverse_instance` block to `sc.execute` for `SingularAssociation`
......@@ -48,9 +48,9 @@ def find_target
end
binds = AssociationScope.get_bind_values(owner, reflection.chain)
if record = sc.execute(binds, klass, conn).first
sc.execute(binds, klass, conn) do |record|
set_inverse_instance record
end
end.first
end
def replace(record)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册