diff options
author | Jon Leighton <j@jonathanleighton.com> | 2013-04-05 05:57:27 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-04-05 05:57:27 -0700 |
commit | 685cf144a9b7171160d6ac71da993349d1b0eda8 (patch) | |
tree | 6ebd80481a4f47de75181aaa657748c223910507 /activerecord/lib/active_record | |
parent | bab0e2804d1c061bf639e2fb01ffc27b9e98384e (diff) | |
parent | 448381593edf0b87e3afd4945bd13650a7483b17 (diff) | |
download | rails-685cf144a9b7171160d6ac71da993349d1b0eda8.tar.gz rails-685cf144a9b7171160d6ac71da993349d1b0eda8.tar.bz2 rails-685cf144a9b7171160d6ac71da993349d1b0eda8.zip |
Merge pull request #9996 from mikz/master
Association with inverse_of does not set the parent in association building block
Diffstat (limited to 'activerecord/lib/active_record')
-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 f3f4792eaa..729ef8c55a 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -236,6 +236,7 @@ module ActiveRecord skip_assign = [reflection.foreign_key, reflection.type].compact attributes = create_scope.except(*(record.changed - skip_assign)) record.assign_attributes(attributes) + set_inverse_instance(record) end end end |