method

walk

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: JoinDependency
walk(left, right) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/join_dependency.rb, line 177
        def walk(left, right)
          intersection, missing = right.children.map { |node1|
            [left.children.find { |node2| node1.match? node2 }, node1]
          }.partition(&:first)

          joins = intersection.flat_map { |l, r| r.table = l.table; walk(l, r) }
          joins.concat missing.flat_map { |_, n| make_constraints(left, n) }
        end
Register or log in to add new notes.