lib/active_record/hierarchical_query/query.rb
# Builds recursive query and joins it to given +relation+.
#
# @api private
# @param [ActiveRecord::Relation] relation
# @param [Hash] join_options
# @option join_options [#to_s] :as joined table alias
# @api private
Builds recursive query and joins it to given +relation+.
Builds recursive query and joins it to given + relation + .
def join_to(relation, join_options = {})
        raise 'Recursive query requires CONNECT BY clause, please use #connect_by method' unless
            connect_by_value
        table_alias = join_options.fetch(:as, "#{normalized_table_name}__recursive")
        JoinBuilder.new(self, relation, table_alias, join_options).build
      end
def join_to ( relation , join_options = { } ) raise 'Recursive query requires CONNECT BY clause, please use #connect_by method' unless connect_by_value table_alias = join_options . fetch ( :as , "#{normalized_table_name}__recursive" ) JoinBuilder . new ( self , relation , table_alias , join_options ) . build end
Builds recursive query and joins it to given +relation+.
Builds recursive query and joins it to given + relation + .
relation
<not_specific>
join_options
:as joined table alias
: as joined table alias
<not_specific>
None
api
None
api
None