aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2013-10-04 10:15:19 -0400
committerArthur Neves <arthurnn@gmail.com>2013-10-04 10:15:22 -0400
commit655396cc100943c2b1afb6f172bc96b9e29c4aad (patch)
treea9b714abf2a24b78dfc44b1f560755244fc5f9f3
parent31c79e291f42b1d862df06c552fe002864aae705 (diff)
downloadrails-655396cc100943c2b1afb6f172bc96b9e29c4aad.tar.gz
rails-655396cc100943c2b1afb6f172bc96b9e29c4aad.tar.bz2
rails-655396cc100943c2b1afb6f172bc96b9e29c4aad.zip
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.
-rw-r--r--activerecord/lib/active_record/associations/collection_association.rb1
1 files changed, 1 insertions, 0 deletions
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