Permalink
Browse files

this method is only ever called with a reflection

Stop typechecking the parameter.  We know the type.
  • Loading branch information...
1 parent 7e5c5e4 commit db5a5eaeecaabc8959e031fcd831a584ab209041 @tenderlove tenderlove committed Oct 8, 2013
Showing with 2 additions and 6 deletions.
  1. +2 −6 activerecord/lib/active_record/associations/join_dependency.rb
@@ -173,13 +173,9 @@ def build(associations, parent, join_type)
end
end
- def find_join_association(name_or_reflection, parent)
- if String === name_or_reflection
- name_or_reflection = name_or_reflection.to_sym
- end
-
+ def find_join_association(reflection, parent)
join_associations.detect { |j|
- j.reflection == name_or_reflection && j.parent == parent
+ j.reflection == reflection && j.parent == parent
}
end

0 comments on commit db5a5ea

Please sign in to comment.