Files
nairobi/app/components/admin/roles/table_actions_component.html.erb
Javi Martín 08c2bfc255 Extract component to add/remove admin/mod/manager
We remove some duplication by doing so.
2020-10-21 13:19:52 +02:00

8 lines
297 B
Plaintext

<% if already_has_role? %>
<%= render Admin::TableActionsComponent.new(record, actions: actions) %>
<% else %>
<%= render Admin::TableActionsComponent.new(actions: []) do %>
<%= link_to add_user_text, add_user_path, method: :post, class: "button success expanded" %>
<% end %>
<% end %>