From 655396cc100943c2b1afb6f172bc96b9e29c4aad Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Fri, 4 Oct 2013 10:15:19 -0400 Subject: Add back set_inverse_instance on .add_to_target We must have it in there too, so when an existent record is being concat to another, we will have the inverse relation. --- activerecord/lib/active_record/associations/collection_association.rb | 1 + 1 file changed, 1 insertion(+) 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