Skip to content

Commit 5c5b40e

Browse files
authored
Merge pull request #113 from phlex-ruby/fix-passing-block-to-erb
Fix out of order rendering when yielding from a partial rendered with a block delegated from a component’s content block
2 parents 415c4be + b0cc8bc commit 5c5b40e

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)