diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2011-05-17 22:30:19 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2011-05-17 22:33:36 +0100 |
commit | f3b0be812e39114e5c6768aa6db59c3945fe3a33 (patch) | |
tree | 8d3b7fba12b8d109ee3b96110eb805fc38a2c4a0 /activerecord/lib | |
parent | 324f1451b06c82242426b1a239b0559181b16c37 (diff) | |
download | rails-f3b0be812e39114e5c6768aa6db59c3945fe3a33.tar.gz rails-f3b0be812e39114e5c6768aa6db59c3945fe3a33.tar.bz2 rails-f3b0be812e39114e5c6768aa6db59c3945fe3a33.zip |
Don't pass a block as we are yielding
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/singular_association.rb | 2 |
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? |