Skip to content

Commit

Permalink
Merge pull request #113 from phlex-ruby/fix-passing-block-to-erb
Browse files Browse the repository at this point in the history
Fix out of order rendering when yielding from a partial rendered with a block delegated from a component’s content block
  • Loading branch information
joeldrapper committed Oct 18, 2023
2 parents 415c4be + b0cc8bc commit 5c5b40e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/phlex/rails/sgml/overrides.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def render(*args, **kwargs, &block)
when Enumerable
return super unless renderable.is_a?(ActiveRecord::Relation)
else
@_context.target << @_view_context.render(*args, **kwargs, &block)
@_context.target << @_view_context.render(*args, **kwargs) { capture(&block) }
end

nil
Expand Down

0 comments on commit 5c5b40e

Please sign in to comment.