From 17b6bd4f67303d7a447cb27e58e32038533184c3 Mon Sep 17 00:00:00 2001 From: lrbalt Date: Fri, 14 Dec 2007 20:02:09 +0000 Subject: [PATCH] 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 --- tracks/app/controllers/stats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracks/app/controllers/stats_controller.rb b/tracks/app/controllers/stats_controller.rb index 907acac6..30571414 100755 --- a/tracks/app/controllers/stats_controller.rb +++ b/tracks/app/controllers/stats_controller.rb @@ -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(