Add 'Delete' button to Valuators index/search views

This commit is contained in:
Angel Perez
2017-10-26 16:03:39 -04:00
committed by Angel Perez
parent bb1e5e4608
commit 4e086de493
4 changed files with 18 additions and 8 deletions

View File

@@ -29,7 +29,12 @@
<%= t("admin.valuators.index.no_description") %>
<% end %>
<td>
<% unless user.valuator? %>
<% if user.valuator? %>
<%= link_to t("admin.valuators.valuator.delete"),
admin_valuator_path(user),
method: :delete,
class: "button hollow alert expanded" %>
<% else %>
<%= form_for Valuator.new(user: user), url: admin_valuators_path do |f| %>
<%= f.text_field :description,
label: false,