aboutsummaryrefslogblamecommitdiffstats
path: root/lib/active_relation/relations/compound.rb
blob: 7c844821158b19570b6f0c004f730525c3c59457 (plain) (tree)
1
2
3
4
5
6
7
8
9
                     

                           


                     

                                                                                       
                     
                             

                  
                                                      
       
     
  
module ActiveRelation
  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