Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

just set the default argument, a nil parent should be an error

  • Loading branch information...
commit 26fd5f0cd58814a0391ea681aacf98370cc079a8 1 parent 220f1a0
@tenderlove tenderlove authored
View
3  activerecord/lib/active_record/associations/join_dependency.rb
@@ -131,8 +131,7 @@ def cache_joined_association(association)
ref[association.reflection.name] ||= {}
end
- def build(associations, parent = nil, join_type = Arel::InnerJoin)
- parent ||= join_parts.last
+ def build(associations, parent = join_parts.last, join_type = Arel::InnerJoin)
case associations
when Symbol, String
reflection = parent.reflections[associations.intern] or
Please sign in to comment.
Something went wrong with that request. Please try again.