lib/hightop.rb in hightop-0.1.1 vs lib/hightop.rb in hightop-0.1.2

- old
+ new

@@ -19,9 +19,13 @@ (column.is_a?(Array) ? column : [column]).each do |c| relation = relation.where("#{c} IS NOT NULL") end end + if options[:min] + relation = relation.having("COUNT(*) >= #{options[:min].to_i}") + end + if options[:uniq] relation.uniq.count(options[:uniq]) else relation.count end