From 03cbc599866de901da9be4491f94a076d51a106e Mon Sep 17 00:00:00 2001 From: Takeshi Umeda Date: Tue, 22 Sep 2020 03:37:19 +0900 Subject: [PATCH] Fix method of the DELETE DATA button (#14855) --- app/views/admin/accounts/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index 2c48692b7ba330..f0a216f6b8f622 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -180,7 +180,7 @@ = link_to t('admin.accounts.undo_suspension'), unsuspend_admin_account_path(@account.id), method: :post, class: 'button' if can?(:unsuspend, @account) - if @deletion_request.present? - = link_to t('admin.accounts.delete'), admin_account_path(@account.id), method: :destroy, class: 'button button--destructive', data: { confirm: t('admin.accounts.are_you_sure') } if can?(:destroy, @account) + = link_to t('admin.accounts.delete'), admin_account_path(@account.id), method: :delete, class: 'button button--destructive', data: { confirm: t('admin.accounts.are_you_sure') } if can?(:destroy, @account) - else %div.action-buttons %div