##// END OF EJS Templates
Code cleanup....
Jean-Philippe Lang -
r9809:8a3126e1759e
parent child
Show More
@@ -52,7 +52,7 class WorkflowsController < ApplicationController
52 @statuses ||= IssueStatus.sorted.all
52 @statuses ||= IssueStatus.sorted.all
53
53
54 if @tracker && @role && @statuses.any?
54 if @tracker && @role && @statuses.any?
55 workflows = WorkflowTransition.all(:conditions => {:role_id => @role.id, :tracker_id => @tracker.id})
55 workflows = WorkflowTransition.where(:role_id => @role.id, :tracker_id => @tracker.id).all
56 @workflows = {}
56 @workflows = {}
57 @workflows['always'] = workflows.select {|w| !w.author && !w.assignee}
57 @workflows['always'] = workflows.select {|w| !w.author && !w.assignee}
58 @workflows['author'] = workflows.select {|w| w.author}
58 @workflows['author'] = workflows.select {|w| w.author}
@@ -119,10 +119,10 class WorkflowsController < ApplicationController
119 private
119 private
120
120
121 def find_roles
121 def find_roles
122 @roles = Role.find(:all, :order => 'builtin, position')
122 @roles = Role.sorted.all
123 end
123 end
124
124
125 def find_trackers
125 def find_trackers
126 @trackers = Tracker.find(:all, :order => 'position')
126 @trackers = Tracker.sorted.all
127 end
127 end
128 end
128 end
General Comments 0
You need to be logged in to leave comments. Login now