Code cleanup.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9715 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-05-25 20:43:18 +00:00
parent 59cbc68dde
commit aa18cd54c7
3 changed files with 34 additions and 9 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ class Workflow < ActiveRecord::Base
# Returns workflow transitions count by tracker and role
def self.count_by_tracker_and_role
counts = connection.select_all("SELECT role_id, tracker_id, count(id) AS c FROM #{Workflow.table_name} GROUP BY role_id, tracker_id")
roles = Role.find(:all, :order => 'builtin, position')
trackers = Tracker.find(:all, :order => 'position')
roles = Role.sorted.all
trackers = Tracker.sorted.all
result = []
trackers.each do |tracker|