diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/roles_controller.rb | 9 |
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 |