Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't pass a block as we are yielding

  • Loading branch information...
commit f3b0be812e39114e5c6768aa6db59c3945fe3a33 1 parent 324f145
Andrew White pixeltrix authored
2  activerecord/lib/active_record/associations/singular_association.rb
View
@@ -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?
Please sign in to comment.
Something went wrong with that request. Please try again.