Skip to content

Methods called within the ERB template are not generated in the component output #53

Open
@marcoroth

Description

@marcoroth

ERB Input:

<% if some_condition? %>
  <%= "Text" %>
<% end %>

Output:

class Component < Phlex::HTML
  def template
    if some_condition?
      text "Text"
    end
  end
end

Expected output:

class Component < Phlex::HTML
  def template
    if some_condition?
      text "Text"
    end
  end

  private 
  
  # TODO: Implement the `some_condition?` method
  def some_condition?
    super
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions