Files
grecia/app/components/admin/roles/table_actions_component.html.erb
Javi Martín 629e208e9d Add and apply ArgumentAlignment rubocop rule
We're choosing the default `with_first_argument` style because it's the
one we use the most.
2023-08-18 14:56:16 +02:00

12 lines
380 B
Plaintext

<% if already_has_role? %>
<%= render Admin::TableActionsComponent.new(
record,
actions: actions,
destroy_options: { class: "destroy-role-link" }
) %>
<% else %>
<%= render Admin::TableActionsComponent.new(record, actions: []) do |actions| %>
<%= actions.action(:create_role, text: add_user_text, path: add_user_path, method: :post) %>
<% end %>
<% end %>