Content renders twice when rendering a layout in a ViewComponent
I created a ViewComponent based on an existing rails view that renders a layout. The ViewComponent template file looked something like this:
<%= render layout: "path/to/layout/file" do %>
<%= form_tag example_path, method: :put do %>
# some form code here
<%= end %>
<% end %>
When viewing my component in the UI, I saw the form_tag and everything inside it rendering twice - once above the layout, and once within the layout.
I'm not sure it's a common occurrence to have a layout file in a ViewComponent, and I plan on working around it by converting the layout to its own ViewComponent.
Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.
Hi @kellymason, so sorry we didn't get back to you on this! Do you know if this is still a valid issue?