turbo_stream_from
на сайте с November 14, 2022 02:24
Used in the view to create a subscription to a stream identified by the streamables running over the Turbo::StreamsChannel. The stream name being generated is safe to embed in the HTML sent to a user without fear of tampering, as it is signed using Turbo.signed_stream_verifier. Example: # app/views/entries/index.html.erb <%= turbo_stream_from Current.account, :entries %> <div id="entries">New entries will be appended to this target</div>.