This way it will be easier to change the behavior of all table actions, like adding ARIA attributes. In the past, when we changed the behavior of the `link_to` method, we had to change all table action classes.
15 lines
503 B
Plaintext
15 lines
503 B
Plaintext
<%= render Admin::TableActionsComponent.new(record, actions: []) do |actions| %>
|
|
<%= actions.action(:restore,
|
|
text: restore_text,
|
|
path: restore_path,
|
|
method: :put,
|
|
confirm: true) %>
|
|
|
|
<% unless record.confirmed_hide? %>
|
|
<%= actions.action(:confirm_hide,
|
|
text: confirm_hide_text,
|
|
path: confirm_hide_path,
|
|
method: :put) %>
|
|
<% end %>
|
|
<% end %>
|