I am trying to render a partial using a named yield. Here's my template
<%= render 'shared/remote_modal', modal_title: "bru" do %>
<%= content_for(:modal_content) do %>
<%= render @registrations, show_learner: true, show_product: false %>
<% end %>
<% end %>
and here's shared/remote_modal :
<div class="relative px-4 w-full max-w-6xl md:h-auto">
<!-- Modal content -->
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
<!-- Modal header -->
<div class="w-full">
<div class="flex justify-between items-start p-5 rounded-t">
<div class="w-full-0">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">
<%= modal_title %>
</h3>
</div>
<i class="close-modal fas fa-times text-lg cursor-pointer"></i>
</div>
</div>
<!-- Modal body -->
<div class="px-6">
<div class="w-full">
<%= yield(:modal_content) %>
</div>
</div>
</div>
As you can see shared/remote_modal has yield(:modal_content) and my template uses content_for(:modal_content). However the block within content_for(:modal_content) is not rendering.
If I change it to a "simple" "unnamed" yield though, it will render properly. Are named yield not supported with partials ? Is there a workaround to this ?