By omitting the :request_id from the
Turbo::Broadcastable#broadcast_rendering_with_defaults, it isn't passed as part of partial rendering.
Likewise, since broadcast_refresh never renders a partial, but instead builds an empty <turbo-stream action="refresh" request-id="..."></turbo-stream> element, the :request_id local variable isn't necessary.
When rendering
<turbo-stream>
elements for broadcasting, omit the:request_id
partial-local variable.When rendered partials utilize Action View strict locals, the extra variable raises an error:
By omitting the
:request_id
from theTurbo::Broadcastable#broadcast_rendering_with_defaults
, it isn't passed as part of partial rendering.Likewise, since
broadcast_refresh
never renders a partial, but instead builds an empty<turbo-stream action="refresh" request-id="..."></turbo-stream>
element, the:request_id
local variable isn't necessary.