lib/roda/plugins/render.rb in roda-3.81.0 vs lib/roda/plugins/render.rb in roda-3.82.0

- old
+ new

@@ -146,9 +146,22 @@ # # In general, these methods are used to wrap the content of the block and # inject the content into the output. To get similar behavior with Roda, you have # a few different options you can use. # + # == Use Erubi::CaptureBlockEngine + # + # Roda defaults to using Erubi for erb template rendering. Erubi 1.13.0+ includes + # support for an erb variant that supports blocks in <tt><%=</tt> and <tt><%==</tt> + # tags. To use it: + # + # require 'erubi/capture_block' + # plugin :render, template_opts: {engine_class: Erubi::CaptureBlockEngine} + # + # See the Erubi documentation for how to capture data inside the block. Make sure + # the method call (+some_method+ in the example) returns the output you want added + # to the rendered body. + # # == Directly Inject Template Output # # You can switch from a <tt><%=</tt> tag to using a <tt><%</tt> tag: # # <% some_method do %>