summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-05 15:59:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-05 15:59:43 +0000
commit353914768e4d96b424dd0501a661797a8b15eb2c (patch)
tree3718f924eae839760a61234cdb77f1ee868979a4 /app/controllers
parent21887c742a394427f3ae7ba5fcdb33d99c288aab (diff)
downloadredmine-353914768e4d96b424dd0501a661797a8b15eb2c.tar.gz
redmine-353914768e4d96b424dd0501a661797a8b15eb2c.zip
Code cleanup.
git-svn-id: http://svn.redmine.org/redmine/trunk@16490 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/roles_controller.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb
index a09455949..d134e1f67 100644
--- a/app/controllers/roles_controller.rb
+++ b/app/controllers/roles_controller.rb
@@ -92,10 +92,11 @@ class RolesController < ApplicationController
end
def destroy
- @role.destroy
- redirect_to roles_path
- rescue
- flash[:error] = l(:error_can_not_remove_role)
+ begin
+ @role.destroy
+ rescue
+ flash[:error] = l(:error_can_not_remove_role)
+ end
redirect_to roles_path
end