Something like:
Turbo::StreamsBuilder.render do |turbo_stream|
turbo_stream.append(...)
turbo_stream.console_log(...)
turbo_stream.morph(...)
end
Which would return one string like:
<turbo-stream action="append" ...>...</turbo-stream>
<turbo-stream action="console_log" ...>...</turbo-stream>
<turbo-stream action="morph" ...>...</turbo-stream>
or inside a model:
class Post < ApplicationRecord
broadcast_turbo_stream_actions do |turbo_stream|
turbo_stream.append(...)
turbo_stream.console_log(...)
turbo_stream.morph(...)
end
end
Something like:
Which would return one string like:
or inside a model: