diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-11 19:39:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-11 19:39:47 +0000 |
commit | 8ab9215ea8df2216ccfacf272804811b05ab82c8 (patch) | |
tree | ac9ab871a1f9fc1a190cd6505ee08e8efacf8863 /app/controllers/roles_controller.rb | |
parent | 60d06d8c17290f536cf76ffd4a75bdafe540aa9a (diff) | |
download | redmine-8ab9215ea8df2216ccfacf272804811b05ab82c8.tar.gz redmine-8ab9215ea8df2216ccfacf272804811b05ab82c8.zip |
Use named routes in controllers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10983 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/roles_controller.rb')
-rw-r--r-- | app/controllers/roles_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 72c9c70bf..292304260 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -58,7 +58,7 @@ class RolesController < ApplicationController @role.workflow_rules.copy(copy_from) end flash[:notice] = l(:notice_successful_create) - redirect_to :action => 'index' + redirect_to roles_path else @roles = Role.sorted.all render :action => 'new' @@ -71,7 +71,7 @@ class RolesController < ApplicationController def update if request.put? and @role.update_attributes(params[:role]) flash[:notice] = l(:notice_successful_update) - redirect_to :action => 'index' + redirect_to roles_path else render :action => 'edit' end @@ -79,10 +79,10 @@ class RolesController < ApplicationController def destroy @role.destroy - redirect_to :action => 'index' + redirect_to roles_path rescue flash[:error] = l(:error_can_not_remove_role) - redirect_to :action => 'index' + redirect_to roles_path end def permissions @@ -94,7 +94,7 @@ class RolesController < ApplicationController role.save end flash[:notice] = l(:notice_successful_update) - redirect_to :action => 'index' + redirect_to roles_path end end |