fixes #612 I hope again. Changes GROUP BY in both SQL for tagclouds.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@690 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lrbalt 2007-12-14 20:02:09 +00:00
parent 34075aab89
commit 17b6bd4f67

View file

@ -624,7 +624,7 @@ class StatsController < ApplicationController
query << " WHERE tags.id = tag_id"
query << " AND taggings.user_id="+@user.id.to_s+" "
query << " AND taggings.taggable_type='Todo' "
query << " GROUP BY tags.id"
query << " GROUP BY tags.id, tags.name"
query << " ORDER BY count DESC, name"
query << " LIMIT 100"
@tags_for_cloud = Tag.find_by_sql(query).sort_by { |tag| tag.name.downcase }
@ -646,7 +646,7 @@ class StatsController < ApplicationController
query << " AND taggings.taggable_id=todos.id "
query << " AND (todos.created_at > ? OR "
query << " todos.completed_at > ?) "
query << " GROUP BY tags.id"
query << " GROUP BY tags.id, tags.name"
query << " ORDER BY count DESC, name"
query << " LIMIT 100"
@tags_for_cloud_90days = Tag.find_by_sql(