1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
module Arel
class Compound < Relation
attr_reader :relation
hash_on :relation
delegate :joins, :selects, :join?, :orders, :groupings, :inserts, :taken,
:skipped, :name, :aggregation?, :column_for,
:engine, :table, :table_sql,
:to => :relation
def attributes
@attributes ||= relation.attributes.collect { |a| a.bind(self) }
end
def selects
@selects || relation.selects.collect { |s| s.bind(self) }
end
end
end
|