Permalink
Browse files

we always have a model now

  • Loading branch information...
1 parent 50e6b69 commit 8c155a656201a4b39a7b671bb27b081fa34f268b @tenderlove tenderlove committed Oct 12, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/join_dependency.rb
View
2 activerecord/lib/active_record/associations/join_dependency.rb
@@ -230,7 +230,7 @@ def construct_model(record, join_part, row)
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)

0 comments on commit 8c155a6

Please sign in to comment.