Module: Turbo::Train::StreamsHelper

Defined in:
app/helpers/turbo/train/streams_helper.rb

Instance Method Summary collapse

Instance Method Details

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



2
3
4
5
# File 'app/helpers/turbo/train/streams_helper.rb', line 2

def turbo_train_from(*streamables, **attributes)
  attributes[:href] = Turbo::Train.server(attributes[:server]&.to_sym).listen_url(streamables, platform: "web")
  tag.turbo_train_stream_source(**attributes)
end