Add alert to the delete button of 'My activity' section so that users don't delete their investmentes accidentally

This commit is contained in:
iagirre
2018-01-25 09:25:11 +01:00
parent 6918bd699c
commit f2927c8eb2
3 changed files with 4 additions and 1 deletions

View File

@@ -5,7 +5,8 @@
<td>
<% if can? :destroy, budget_investment %>
<%= link_to t('shared.delete'), budget_investment_path(budget_investment.budget, budget_investment),
method: :delete, class: "button hollow alert expanded" %>
method: :delete, class: "button hollow alert expanded",
data: {confirm: "#{t('users.show.delete_alert')}"} %>
<% end %>
</td>
</tr>