From 93c9f4a942c622ecbe8d46ab4838bd072aef9fc0 Mon Sep 17 00:00:00 2001 From: Jason Cheow Date: Sun, 14 Nov 2010 13:55:36 +0800 Subject: Fix bug where size of through association is not correct after adding a has_many association (occurs only before main object has been reloaded). [#5968 state:committed] Signed-off-by: Santiago Pastorino --- .../lib/active_record/associations/has_many_through_association.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activerecord/lib/active_record/associations') diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index 51770cff0f..0a5858f36e 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -69,7 +69,6 @@ module ActiveRecord through_association = @owner.send(@reflection.through_reflection.name) through_record = through_association.create!(construct_join_attributes(record)) - through_association.proxy_target << through_record end # TODO - add dependent option support -- cgit v1.2.3