blob: 57323e90f308fdf2912e7e3886cc0cb64cf3c037 (
plain) (
tree)
|
|
module ActiveRelation
class Grouping < Compound
attr_reader :expressions, :groupings
def initialize(relation, *groupings)
@relation, @groupings = relation, groupings.collect { |g| g.bind(relation) }
end
def ==(other)
self.class == other.class and
relation == other.relation and
groupings == other.groupings
end
def aggregation?
true
end
end
end
|