di-acts-as-taggable 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -232,9 +232,9 @@ module ActiveRecord
|
|
232
232
|
at_least = sanitize_sql(['COUNT(*) >= ?', options.delete(:at_least)]) if options[:at_least]
|
233
233
|
at_most = sanitize_sql(['COUNT(*) <= ?', options.delete(:at_most)]) if options[:at_most]
|
234
234
|
having = [at_least, at_most].compact.join(' AND ')
|
235
|
-
group_by = "#{Tag.table_name}.
|
235
|
+
group_by = "#{Tag.table_name}.name"
|
236
236
|
|
237
|
-
{ :select => "#{Tag.table_name}
|
237
|
+
{ :select => "#{Tag.table_name}.name, COUNT(*) AS count",
|
238
238
|
:joins => joins.join(" "),
|
239
239
|
:conditions => conditions,
|
240
240
|
:group => group_by,
|