Commit 370fe477 authored by Tugce Nur Tas's avatar Tugce Nur Tas Committed by Tuğçe Nur Taş
Browse files

move delete link from show to index view

parent 7ae26fde
tr
td= link_to user.email, user
td= t("role.#{user.role}")
td
= link_to user.email, user
td
= t("role.#{user.role}")
- if policy(user).destroy?
= link_to t_action(:destroy), user, data: { confirm: t('are_you_sure')}, method: :delete
......@@ -9,6 +9,7 @@
tr
th= t_attr(:email)
th= t_attr(:role)
th=
tbody
= render @users
......
......@@ -8,5 +8,6 @@
strong= t_attr(:role)
.col-md-8 = t("role.#{@user.role}")
- if policy(@user).destroy?
= link_to t_action(:destroy), @user, data: { confirm: t('are_you_sure')}, method: :delete, class: 'btn btn-danger'
.row
.col-xs-12
p= link_to t('back'), clients_path, class: 'btn btn-default'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment