diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-13 16:55:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-13 16:55:28 +0000 |
commit | f731545c619b6e6a641d40f944e45f99aff8185e (patch) | |
tree | 5196cbe7aacebce0c87f3a5672733859d44f1765 /app/controllers/workflows_controller.rb | |
parent | e52ecb494b00a3e3e98778ac967e71734e15d733 (diff) | |
download | redmine-f731545c619b6e6a641d40f944e45f99aff8185e.tar.gz redmine-f731545c619b6e6a641d40f944e45f99aff8185e.zip |
Use a simple count query.
git-svn-id: http://svn.redmine.org/redmine/trunk@13750 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/workflows_controller.rb')
-rw-r--r-- | app/controllers/workflows_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index d00ee03bc..0968977cb 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -21,7 +21,9 @@ class WorkflowsController < ApplicationController before_filter :require_admin def index - @workflow_counts = WorkflowTransition.count_by_tracker_and_role + @roles = Role.sorted.select(&:consider_workflow?) + @trackers = Tracker.sorted + @workflow_counts = WorkflowTransition.group(:tracker_id, :role_id).count end def edit |