From ce59e0c495a782a8b584282f62e4c0c793ff3fdd Mon Sep 17 00:00:00 2001 From: Nick Giancola Date: Wed, 18 Oct 2023 15:28:13 -0700 Subject: [PATCH] Fix empty children rendering bug in Rails 7.1. Because our children explicitly concat on @output_buffer, we should not return anything from capture block. This used to work anyway on Rails <7.1 but it no longer works --- lib/rbexy/configuration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rbexy/configuration.rb b/lib/rbexy/configuration.rb index ffb4de6..6f167c7 100644 --- a/lib/rbexy/configuration.rb +++ b/lib/rbexy/configuration.rb @@ -21,7 +21,7 @@ def transforms def component_rendering_templates @component_rendering_templates ||= { - children: "{capture{%{children}}}", + children: "{capture{%{children};nil}}", component: "::%{component_class}.new(%{view_context},%{kwargs}).render_in%{children_block}" } end