mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't pass a block as we are yielding
This commit is contained in:
parent
324f1451b0
commit
f3b0be812e
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ module ActiveRecord
|
|||
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?
|
||||
|
|
Loading…
Reference in a new issue