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

Commit

Permalink
Merge pull request #35 from jerhinesmith/fix-joins-in-rails-5-2
Browse files Browse the repository at this point in the history
`make_constraints` returns an array in rails 5.2, so remove unnecessary coercing
  • Loading branch information
scarroll32 authored Jan 23, 2018
2 parents 66142a7 + f2e0468 commit 0386f06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/polyamorous/activerecord_5.2_ruby_2/join_dependency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def make_polyamorous_left_outer_joins(parent, child)
join_type = Arel::Nodes::OuterJoin
info = make_constraints parent, child, tables, join_type

[info] + child.children.flat_map { |c|
info + child.children.flat_map { |c|
make_polyamorous_left_outer_joins(child, c)
}
end
Expand All @@ -96,7 +96,7 @@ def make_polyamorous_inner_joins(parent, child)
join_type = child.join_type || Arel::Nodes::InnerJoin
info = make_constraints parent, child, tables, join_type

[info] + child.children.flat_map { |c|
info + child.children.flat_map { |c|
make_polyamorous_inner_joins(child, c)
}
end
Expand Down

0 comments on commit 0386f06

Please sign in to comment.