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.
12 lines
321 B
Plaintext
12 lines
321 B
Plaintext
<div class="table-actions">
|
|
<%= content %>
|
|
|
|
<% if actions.include?(:edit) %>
|
|
<%= action(:edit, edit_options.merge(text: edit_text, path: edit_path)) %>
|
|
<% end %>
|
|
|
|
<% if actions.include?(:destroy) %>
|
|
<%= action(:destroy, destroy_options.merge(text: destroy_text, path: destroy_path)) %>
|
|
<% end %>
|
|
</div>
|