From 3af4ae82e587b12664626e7b22bc6cc21ebbca2e Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Wed, 25 Sep 2013 14:24:27 -0400 Subject: Make sure inverse_of is visible on the has_many callbacks --- activerecord/lib/active_record/associations/has_many_association.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index a3fcca8a27..0a23109b9b 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -32,6 +32,7 @@ module ActiveRecord def insert_record(record, validate = true, raise = false) set_owner_attributes(record) + set_inverse_instance(record) if raise record.save!(:validate => validate) -- cgit v1.2.3