Replace 'remove this redaction' confirmation and request with Turbo
This commit is contained in:
parent
a0c9504e22
commit
138988860c
2 changed files with 34 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
|||
<%= link_to t(".edit"), edit_redaction_path(@redaction), :class => "btn btn-outline-primary" %>
|
||||
<% end %>
|
||||
<% if can?(:destroy, Redaction) %>
|
||||
<%= link_to t(".destroy"), @redaction, :method => "delete", :class => "btn btn-outline-danger", :remote => true, :data => { :confirm => t(".confirm") } %>
|
||||
<%= link_to t(".destroy"), @redaction, :class => "btn btn-outline-danger", :data => { :turbo => true, :turbo_method => "DELETE", :turbo_confirm => t(".confirm") } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue