提交 f3b0be81 编写于 作者: A Andrew White

Don't pass a block as we are yielding

上级 324f1451
......@@ -25,7 +25,7 @@ def create!(attributes = {}, options = {}, &block)
build(attributes, options, &block).tap { |record| record.save! }
end
def build(attributes = {}, options = {}, &block)
def build(attributes = {}, options = {})
record = reflection.build_association(attributes, options)
record.assign_attributes(create_scope.except(*record.changed), :without_protection => true)
yield(record) if block_given?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册