lib/phlex/rails/sgml/overrides.rb in phlex-rails-1.1.0 vs lib/phlex/rails/sgml/overrides.rb in phlex-rails-1.1.1

- old
+ new

@@ -21,10 +21,11 @@ when Class return super if renderable < Phlex::SGML when Enumerable return super unless renderable.is_a?(ActiveRecord::Relation) else - @_context.target << @_view_context.render(*args, **kwargs) { capture(&block) } + captured_block = -> { capture(&block) } if block + @_context.target << @_view_context.render(*args, **kwargs, &captured_block) end nil end