lib/hightop.rb in hightop-0.0.2 vs lib/hightop.rb in hightop-0.0.3

- old
+ new

@@ -1,10 +1,10 @@ require "hightop/version" module Hightop def top(column, limit = nil) - column = connection.quote_table_name(column) + column = connection.quote_table_name(column) if column.is_a?(Symbol) group(column).where("#{column} IS NOT NULL").order("count_all DESC, #{column}").limit(limit).count end end