aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/recursion.rb
blob: fa4d9969c9ce488c93bdfb4db4ee6284c89793da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Arel
  module Recursion
    module BaseCase
      def table
        self
      end

      def table_sql(formatter = Sql::TableReference.new(self))
        formatter.table self
      end
      
      def relation_for(attribute)
        self[attribute] && self
      end
    end
  end
end