lib/ransack/adapters/active_record/context.rb
def join_sources
            base, joins =
            if ::ActiveRecord::VERSION::MAJOR >= 5
              [
                Arel::SelectManager.new(@object.table),
                @join_dependency.join_constraints(@object.joins_values, @join_type)
              ]
            else
              [
                Arel::SelectManager.new(@object.engine, @object.table),
                @join_dependency.join_constraints(@object.joins_values)
              ]
            end
            joins.each do |aliased_join|
              base.from(aliased_join)
            end
            base.join_sources
          end
# All dependent Arel::Join nodes used in the search query.
#
# This could otherwise be done as `@object.arel.join_sources`, except
# that ActiveRecord's build_joins sets up its own JoinDependency.
# This extracts what we need to access the joins using our existing
# JoinDependency to track table aliases.
#
All dependent Arel::Join nodes used in the search query.
This could otherwise be done as `@object.arel.join_sources`, except
that ActiveRecord's build_joins sets up its own JoinDependency.
This extracts what we need to access the joins using our existing
JoinDependency to track table aliases.
All dependent Arel :: Join nodes used in the search query . This could otherwise be done as ` @object . arel . join_sources ` except that ActiveRecord ' s build_joins sets up its own JoinDependency . This extracts what we need to access the joins using our existing JoinDependency to track table aliases .
def join_sources
            base, joins =
            if ::ActiveRecord::VERSION::MAJOR >= 5
              [
                Arel::SelectManager.new(@object.table),
                @join_dependency.join_constraints(@object.joins_values, @join_type)
              ]
            else
              [
                Arel::SelectManager.new(@object.engine, @object.table),
                @join_dependency.join_constraints(@object.joins_values)
              ]
            end
            joins.each do |aliased_join|
              base.from(aliased_join)
            end
            base.join_sources
          end
def join_sources base , joins = if :: ActiveRecord :: VERSION :: MAJOR >= 5 [ Arel :: SelectManager . new ( @object . table ) , @join_dependency . join_constraints ( @object . joins_values , @join_type ) ] else [ Arel :: SelectManager . new ( @object . engine , @object . table ) , @join_dependency . join_constraints ( @object . joins_values ) ] end joins . each do | aliased_join | base . from ( aliased_join ) end base . join_sources end
All dependent Arel::Join nodes used in the search query.
All dependent Arel :: Join nodes used in the search query .