instance method broadcast_render_to

Ruby on Rails 1.4.0

Since v1.3.3 Last seen in v2.0.23

Available in: v1.3.3 v1.4.0 v1.5.0 v2.0.23

Signature

broadcast_render_to(*streamables, **rendering)

Same as broadcast_render but run with the added option of naming the stream using the passed streamables.

Note that rendering inline via this method will cause template rendering to happen synchronously. That is usually not desireable for model callbacks, certainly not if those callbacks are inside of a transaction. Most of the time you should be using broadcast_render_later_to, unless you specifically know why synchronous rendering is needed.

Parameters

streamables rest
rendering keyrest
Source
# File app/models/concerns/turbo/broadcastable.rb, line 326
  def broadcast_render_to(*streamables, **rendering)
    Turbo::StreamsChannel.broadcast_render_to(*streamables, **broadcast_rendering_with_defaults(rendering))
  end

Defined in app/models/concerns/turbo/broadcastable.rb line 326 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Turbo::Broadcastable

Type at least 2 characters to search.

↑↓ navigate · open · esc close