spec/support/models.rb
# Arel::Nodes::As delegates name to the left relation
:Nodes::As delegates name to the left relation
: Nodes :: As delegates name to the left relation
def alias_node_query
    Category.left_outer_joins(:articles)
      .join_recursive do |query|
      query
        .connect_by(id: :parent_id)
    end
  end
def alias_node_query Category . left_outer_joins ( :articles ) . join_recursive do | query | query . connect_by ( id : :parent_id ) end end
Arel::Nodes::As delegates name to the left relation
Arel :: Nodes :: As delegates name to the left relation