Flowdock
method

merge_joins

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Merger
merge_joins() 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/relation/merger.rb, line 110
        def merge_joins
          return if other.joins_values.empty?

          if other.klass == relation.klass
            relation.joins_values |= 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
Register or log in to add new notes.