Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9992 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2f55caa1ba
commit
8a3126e175
|
@ -52,7 +52,7 @@ class WorkflowsController < ApplicationController
|
||||||
@statuses ||= IssueStatus.sorted.all
|
@statuses ||= IssueStatus.sorted.all
|
||||||
|
|
||||||
if @tracker && @role && @statuses.any?
|
if @tracker && @role && @statuses.any?
|
||||||
workflows = WorkflowTransition.all(:conditions => {:role_id => @role.id, :tracker_id => @tracker.id})
|
workflows = WorkflowTransition.where(:role_id => @role.id, :tracker_id => @tracker.id).all
|
||||||
@workflows = {}
|
@workflows = {}
|
||||||
@workflows['always'] = workflows.select {|w| !w.author && !w.assignee}
|
@workflows['always'] = workflows.select {|w| !w.author && !w.assignee}
|
||||||
@workflows['author'] = workflows.select {|w| w.author}
|
@workflows['author'] = workflows.select {|w| w.author}
|
||||||
|
@ -119,10 +119,10 @@ class WorkflowsController < ApplicationController
|
||||||
private
|
private
|
||||||
|
|
||||||
def find_roles
|
def find_roles
|
||||||
@roles = Role.find(:all, :order => 'builtin, position')
|
@roles = Role.sorted.all
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_trackers
|
def find_trackers
|
||||||
@trackers = Tracker.find(:all, :order => 'position')
|
@trackers = Tracker.sorted.all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue