Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Commit

Permalink
Code docs improvement [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatack committed Dec 5, 2015
1 parent a18efb2 commit 4166cb5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def build_join_association_respecting_polymorphism(reflection, parent, klass)
# Replaces ActiveRecord::Associations::JoinDependency#join_constraints.
#
# This internal method was changed in Rails 5.0 by commit
# https://github.com/rails/rails/commit/e038975
# which added left_outer_joins and passing `join_type` to the method.
# https://github.com/rails/rails/commit/e038975 which added
# left_outer_joins (see #make_polyamorous_left_outer_joins below) and added
# passing an additional argument, `join_type`, to #join_constraints.
#
def join_constraints(outer_joins, join_type)
joins = join_root.children.flat_map { |child|
Expand All @@ -71,7 +72,9 @@ def join_constraints(outer_joins, join_type)
}
end

# Replaces ActiveRecord::Associations::JoinDependency#make_left_outer_joins.
# Replaces ActiveRecord::Associations::JoinDependency#make_left_outer_joins,
# a new method that was added in Rails 5.0 with the following commit:
# https://github.com/rails/rails/commit/e038975
#
def make_polyamorous_left_outer_joins(parent, child)
tables = child.tables
Expand Down

0 comments on commit 4166cb5

Please sign in to comment.