Skip to content

turbo_stream helpers not capturing correctly #1137

Closed
@boardfish

Description

@boardfish

I'm trying to update multiple parts of the page by rendering a component that uses multiple turbo_stream.update tags. This comes out mangled, with a subset of the expected HTML rendered followed by several empty turbo-stream tags. I'll put together a failing test case soon.

Steps to reproduce

  1. Create a component whose template renders turbo-stream tags using the helper provided by turbo-rails.
  2. Render this in a controller action as follows:
respond_to { |format| format.turbo_stream { render ExampleComponent.new } }

Expected behavior

The content given to each use of the turbo_stream.update helper should be rendered inside turbo-stream tags.

Actual behavior

Some content is captured and rendered before empty turbo-stream tags.

System configuration

Rails version: 7.0.0.alpha2

Ruby version: 2.7.4

Gem version: 2.40.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions