Use named routes in controllers.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10983 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-11 19:39:47 +00:00
parent 60d06d8c17
commit 8ab9215ea8
22 changed files with 117 additions and 88 deletions

View File

@@ -38,7 +38,7 @@ class WorkflowsController < ApplicationController
}
}
if @role.save
redirect_to :action => 'edit', :role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only]
redirect_to workflows_edit_path(:role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only])
return
end
end
@@ -64,7 +64,7 @@ class WorkflowsController < ApplicationController
if request.post? && @role && @tracker
WorkflowPermission.replace_permissions(@tracker, @role, params[:permissions] || {})
redirect_to :action => 'permissions', :role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only]
redirect_to workflows_permissions_path(:role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only])
return
end
@@ -111,7 +111,7 @@ class WorkflowsController < ApplicationController
else
WorkflowRule.copy(@source_tracker, @source_role, @target_trackers, @target_roles)
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'copy', :source_tracker_id => @source_tracker, :source_role_id => @source_role
redirect_to workflows_copy_path(:source_tracker_id => @source_tracker, :source_role_id => @source_role)
end
end
end