lib/ransack/adapters/active_record/3.1/context.rb
# 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 = Arel::SelectManager.new(@object.engine, @object.table)
          @object.joins_values.each do |assoc|
            next unless assoc.is_a?(JoinDependency::JoinAssociation)
            assoc.join_to(base)
          end
          base.join_sources
        end
def join_sources base = Arel :: SelectManager . new ( @object . engine , @object . table ) @object . joins_values . each do | assoc | next unless assoc . is_a? ( JoinDependency :: JoinAssociation ) assoc . join_to ( base ) 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.
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 .