aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/join_dependency.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-10-11 17:38:11 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-10-11 17:38:11 -0700
commit8c155a656201a4b39a7b671bb27b081fa34f268b (patch)
tree1258850d84f9142b5482b370dd48c56fef9fc063 /activerecord/lib/active_record/associations/join_dependency.rb
parent50e6b69018ca4dfcdd30030f1c402da9b0d9563b (diff)
downloadrails-8c155a656201a4b39a7b671bb27b081fa34f268b.tar.gz
rails-8c155a656201a4b39a7b671bb27b081fa34f268b.tar.bz2
rails-8c155a656201a4b39a7b671bb27b081fa34f268b.zip
we always have a model now
Diffstat (limited to 'activerecord/lib/active_record/associations/join_dependency.rb')
-rw-r--r--activerecord/lib/active_record/associations/join_dependency.rb2
1 files changed, 1 insertions, 1 deletions
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)