Adds delete link to budget investment list in user activities
This commit is contained in:
@@ -55,7 +55,7 @@ module Budgets
|
||||
end
|
||||
|
||||
def destroy
|
||||
investment.destroy
|
||||
@investment.destroy
|
||||
redirect_to user_path(current_user, filter: 'budget_investments'), notice: t('flash.actions.destroy.budget_investment')
|
||||
end
|
||||
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
<td>
|
||||
<%= link_to budget_investment.title, budget_investment_path(budget_investment.budget, budget_investment) %>
|
||||
</td>
|
||||
<td>
|
||||
<% if can? :destroy, budget_investment %>
|
||||
<%= link_to t('shared.delete'), budget_investment_path(budget_investment.budget, budget_investment), method: :delete %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user