Skip to content

Commit b0cc8bc

Browse files
committed
Fix out of order rendering when yielding from a partial rendered with a block delegated from a component’s content block
1 parent 415c4be commit b0cc8bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/phlex/rails/sgml/overrides.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def render(*args, **kwargs, &block)
2323
when Enumerable
2424
return super unless renderable.is_a?(ActiveRecord::Relation)
2525
else
26-
@_context.target << @_view_context.render(*args, **kwargs, &block)
26+
@_context.target << @_view_context.render(*args, **kwargs) { capture(&block) }
2727
end
2828

2929
nil

0 commit comments

Comments
 (0)