diff options
Diffstat (limited to 'lib/arel/relations/compound.rb')
-rw-r--r-- | lib/arel/relations/compound.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/arel/relations/compound.rb b/lib/arel/relations/compound.rb new file mode 100644 index 0000000000..4ffac6d1c3 --- /dev/null +++ b/lib/arel/relations/compound.rb @@ -0,0 +1,16 @@ +module Arel + class Compound < Relation + attr_reader :relation + + hash_on :relation + + delegate :joins, :selects, :orders, :groupings, :table_sql, :inserts, :taken, + :skipped, :name, :alias, :aggregation?, :alias?, :prefix_for, :column_for, + :engine, + :to => :relation + + def attributes + relation.attributes.collect { |a| a.bind(self) } + end + end +end
\ No newline at end of file |