Skip to content

Converter doesn't handle non-standard HTML attributes #284

@marcoroth

Description

@marcoroth

ERB Input:

<button @click.prevent="something">Button</button>

Output:

class ButtonComponent < Phlex::HTML
def template
button(click.: true, prevent: %(something)) { %(Button)
 }
end
end

Expected output:

class ButtonComponent < Phlex::HTML
 def template
    button("@click.prevent": %(something)) { %(Button) }
  end
end

@adamlogic experienced this in the GoRails Phlex episode: https://youtu.be/l4bQSfqZZfQ&t=975

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions