mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-02 23:38:50 +01:00
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:
parent
34075aab89
commit
17b6bd4f67
1 changed files with 2 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue