having(opts, *rest)
public
Allows to specify a HAVING clause. Note that you can’t use HAVING without
also specifying a GROUP clause.
Order.having('SUM(price) > 30').group('user_id')
# File activerecord/lib/active_record/relation/query_methods.rb, line 604
def having(opts, *rest)
opts.blank? ? self : spawn.having!(opts, *rest)
end