From 8c155a656201a4b39a7b671bb27b081fa34f268b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 11 Oct 2013 17:38:11 -0700 Subject: we always have a model now --- activerecord/lib/active_record/associations/join_dependency.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index 060e3f3811..50bd2fbe8e 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -230,7 +230,7 @@ module ActiveRecord if join_part.reflection.collection? model = join_part.instantiate(row) other = record.association(join_part.reflection.name) - other.target.push(model) if model + other.target.push(model) other.set_inverse_instance(model) else return record.association(join_part.reflection.name).target if record.association_cache.key?(join_part.reflection.name) -- cgit v1.2.3