Permalink
Browse files

Don't pass a block as we are yielding

  • Loading branch information...
1 parent 324f145 commit f3b0be812e39114e5c6768aa6db59c3945fe3a33 @pixeltrix pixeltrix committed May 17, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/singular_association.rb
@@ -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?

0 comments on commit f3b0be8

Please sign in to comment.