Extract commponent to render user investment actions
This way it'll be easier to organize code related to it.
This commit is contained in:
@@ -3,14 +3,6 @@
|
||||
<%= link_to budget_investment.title, budget_investment_path(budget_investment.budget, budget_investment) %>
|
||||
</td>
|
||||
<td>
|
||||
<% if can? :update, budget_investment %>
|
||||
<%= link_to t("shared.edit"), edit_budget_investment_path(budget_investment.budget, budget_investment),
|
||||
class: "button hollow" %>
|
||||
<% end %>
|
||||
<% if can? :destroy, budget_investment %>
|
||||
<%= link_to t("shared.delete"), budget_investment_path(budget_investment.budget, budget_investment),
|
||||
method: :delete, class: "button hollow alert",
|
||||
data: { confirm: t("users.show.delete_alert") } %>
|
||||
<% end %>
|
||||
<%= render Users::BudgetInvestmentTableActionsComponent.new(budget_investment) %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user