1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
module Arel class Group < Compound attributes :relation, :groupings deriving :== def initialize(relation, *groupings, &block) @relation = relation @groupings = (groupings + (block_given?? [yield(relatoin)] : [])).collect { |g| g.bind(relation) } end def externalizable? true end end end