redirect to keys index instead of user index after a key is deleted

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Cyril Jouve 2017-03-24 20:29:11 +01:00 committed by Rémy Coutable
parent 42c13b26da
commit 1167a274c1
No known key found for this signature in database
GPG Key ID: 46DF07E5CD9E96AB
2 changed files with 7 additions and 2 deletions

View File

@ -15,9 +15,9 @@ class Admin::KeysController < Admin::ApplicationController
respond_to do |format|
if key.destroy
format.html { redirect_to [:admin, user], notice: 'User key was successfully removed.' }
format.html { redirect_to keys_admin_user_path(user), notice: 'User key was successfully removed.' }
else
format.html { redirect_to [:admin, user], alert: 'Failed to remove user key.' }
format.html { redirect_to keys_admin_user_path(user), alert: 'Failed to remove user key.' }
end
end
end

View File

@ -0,0 +1,5 @@
---
title: Redirect to user's keys index instead of user's index after a key is deleted
in the admin
merge_request: 10227
author: Cyril Jouve