diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-30 14:38:58 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-30 14:38:58 -0700 |
commit | ccd11d58910059f07b28cc518dbdad42cbc8ea0c (patch) | |
tree | a8cf48bfaa9e85439854f89e5cb675df63374740 /activerecord/lib/active_record/associations/association.rb | |
parent | 54c05acdba138f3a7a3d44dfc922b0fe4e4cf554 (diff) | |
parent | 679860400f1c6c542b33e8c80221cc5aca7b5629 (diff) | |
download | rails-ccd11d58910059f07b28cc518dbdad42cbc8ea0c.tar.gz rails-ccd11d58910059f07b28cc518dbdad42cbc8ea0c.tar.bz2 rails-ccd11d58910059f07b28cc518dbdad42cbc8ea0c.zip |
Merge pull request #12413 from arthurnn/inverse_of_on_build
Inverse of on build
Diffstat (limited to 'activerecord/lib/active_record/associations/association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index 99f307922e..1e324c7e95 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -240,6 +240,7 @@ module ActiveRecord skip_assign = [reflection.foreign_key, reflection.type].compact attributes = create_scope.except(*(record.changed - skip_assign)) record.assign_attributes(attributes, :without_protection => true) + set_inverse_instance(record) end end end |