Skip to content

Parser: Support blocks when rendering collections in ActionView and render_nodes #2020

Description

@marcoroth

Support rails/rails#56044

_post.html.erb

<article class="post">
  <h1><%= post.title %></h1>
  <div class="post__body"><%= post.body %></div>

  <%# Render additional content %>
  <%= yield post if block_given? %>
</article>

index.html.erb

<%= render @posts do |post| %>
  <%= link_to "Edit", [:edit, post] %>
<% end %>

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestparserHTML+ERB parser

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions