aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/associations/singular_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/singular_association.rb b/activerecord/lib/active_record/associations/singular_association.rb
index 68fe0bde76..ce1f2a5543 100644
--- a/activerecord/lib/active_record/associations/singular_association.rb
+++ b/activerecord/lib/active_record/associations/singular_association.rb
@@ -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?