diff --git a/lib/phlex/rails/sgml.rb b/lib/phlex/rails/sgml.rb index 715829b..3753a3d 100644 --- a/lib/phlex/rails/sgml.rb +++ b/lib/phlex/rails/sgml.rb @@ -37,15 +37,15 @@ def render(*args, **kwargs, &block) when nil partial = kwargs.delete(:partial) - if partial # this is a hack to get around https://github.com/rails/rails/issues/51015 - return raw( - @_context.view_context.render(partial, **kwargs) do |*yielded_args| - capture(*yielded_args, &block) - end, - ) - else - return super - end + if partial # this is a hack to get around https://github.com/rails/rails/issues/51015 + return raw( + @_context.view_context.render(partial, **kwargs) do |*yielded_args| + capture(*yielded_args, &block) + end + ) + else + return super + end end output = if block