Remove unnecessary link_id

This commit is contained in:
cryptogopher 2024-12-17 02:44:52 +01:00
parent f0dab7a5f9
commit ba8ac5d2fa
3 changed files with 2 additions and 3 deletions

View File

@ -125,7 +125,7 @@ module ApplicationHelper
tag.tr tag.td t('.no_items'), colspan: 10, class: 'hint'
end
def render_turbo_stream(partial, locals)
def render_turbo_stream(partial, locals = {})
"Turbo.renderStreamMessage('#{j(render partial: partial, locals: locals)}'); return false;"
end

View File

@ -22,7 +22,7 @@
<td class="actions">
<%= form.submit form: :unit_form %>
<%= image_link_to t(:cancel), "close-outline", units_path, class: 'dangerous',
name: :cancel, onclick: render_turbo_stream('form_close', {link_id: link_id}) %>
name: :cancel, onclick: render_turbo_stream('form_close') %>
</td>
<td></td>
<% end %>

View File

@ -1,3 +1,2 @@
<%= turbo_stream.close_form @unit %>
<%= turbo_stream.update :flashes %>
<%#= turbo_stream.focus link_id %>