Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Haml duplicates content with turbo_stream and if statement #1169

@0llirocks

Description

@0llirocks

Rails: 7.2.1
Haml: 6.3.0

controller.rb

def index
    respond_to do |format|
      format.html
      format.turbo_stream
    end
end

index.turbo_stream.haml

Test
= if true
  Test

/index.turbo_stream returns

Test
Test
Test
Test

If I change index.turbo_stream.haml to if false everything works

index.turbo_stream.haml

Test
= if false
  Test

/index.turbo_stream returns

Test

I already changed to .erb instead of .haml and everything works as expected, I assume it's a haml issue.

Metadata

Metadata

Assignees

No one assigned

    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