diff --git a/lib/roda/plugins/render.rb b/lib/roda/plugins/render.rb index 81edcbb9..3d17d969 100644 --- a/lib/roda/plugins/render.rb +++ b/lib/roda/plugins/render.rb @@ -148,6 +148,19 @@ module RodaPlugins # 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 <%= and <%== + # 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 <%= tag to using a <% tag: