Method: Superview::Helpers::Turbo#turbo_stream_from

Defined in:
lib/superview/helpers/turbo.rb

#turbo_stream_from(*streamables, **attributes) ⇒ Object



10
11
12
13
14
# File 'lib/superview/helpers/turbo.rb', line 10

def turbo_stream_from(*streamables, **attributes)
  attributes[:channel] = attributes[:channel]&.to_s || "Turbo::StreamsChannel"
  attributes[:"signed-stream-name"] = ::Turbo::StreamsChannel.signed_stream_name(streamables)
  turbo_cable_stream_source **attributes, class: "hidden", style: "display: none;"
end