method
merge_joins
v6.0.0 -
Show latest stable
- Class:
ActiveRecord::Relation::Merger
merge_joins()private
No documentation available.
# File activerecord/lib/active_record/relation/merger.rb, line 114
def merge_joins
return if other.joins_values.blank?
if other.klass == relation.klass
relation.joins!(*other.joins_values)
else
associations, others = other.joins_values.partition do |join|
case join
when Hash, Symbol, Array; true
end
end
join_dependency = other.construct_join_dependency(
associations, Arel::Nodes::InnerJoin
)
relation.joins!(join_dependency, *others)
end
end