From 38aefa51c35e0c7b117291c1cf0b7b4c148e7c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 10 Oct 2013 14:41:37 -0300 Subject: Revert "Merge pull request #12413 from arthurnn/inverse_of_on_build" This reverts commit ccd11d58910059f07b28cc518dbdad42cbc8ea0c, reversing changes made to 54c05acdba138f3a7a3d44dfc922b0fe4e4cf554. Reason: This caused a regression when the associated record is created in a before_create callback. See https://github.com/rails/rails/pull/12413#issuecomment-25848163 --- activerecord/lib/active_record/associations/collection_association.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib/active_record/associations/collection_association.rb') diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index c2dd462b5d..baddb9852f 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -350,6 +350,7 @@ module ActiveRecord end callback(:after_add, record) + set_inverse_instance(record) record end -- cgit v1.2.3