1 2 3 4 5 6 7 8 9 10 11 12 13
module Arel class Having < Compound attributes :relation, :havings deriving :== def initialize(relation, *havings, &block) @relation = relation @havings = (havings + arguments_from_block(relation, &block)) \ .collect { |g| g.bind(relation) } end end end