提交 5fc3564a 编写于 作者: J José Valim

Fix #480. Passing nil to create association works.

上级 0ceb21e3
...@@ -423,7 +423,7 @@ def insert_record(record, validate = true) ...@@ -423,7 +423,7 @@ def insert_record(record, validate = true)
end end
def build_record(attributes, options) def build_record(attributes, options)
reflection.build_association(scoped.scope_for_create.merge(attributes), options) reflection.build_association(scoped.scope_for_create.merge(attributes || {}), options)
end end
def delete_or_destroy(records, method) def delete_or_destroy(records, method)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册