Manage client-side js with turbo_stream actions

This commit is contained in:
2024-01-22 02:14:01 +01:00
parent 0e8bc18620
commit a7f80a575c
6 changed files with 30 additions and 17 deletions

View File

@@ -102,6 +102,10 @@ module ApplicationHelper
tag.tr tag.td t('.no_items'), colspan: 10, class: 'hint'
end
def turbo_stream_handler(partial)
"Turbo.renderStreamMessage('#{j(render partial: partial)}'); return false;"
end
private
def image_element_to(type, name, image = nil, options = nil, html_options = {})