Roda 3.91.0 Released #383
jeremyevans
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Roda 3.91.0 has been released!
New Features
The render_each method in the render_each plugin now accepts a
block. If passed a block, instead of returning a concatenation
of the rendered template output, it yields each rendered template
output, and returns nil. This allows for use in the case where you
want to wrap the template output:
If can also be used to reduce memory usage even in the case where
you are not wrapping template output. Instead of:
You can do:
This will avoid building a potentially large unnecessary intermediate
string.
The capture_erb plugin now supports a returns: :buffer method and
plugin option. When this option is provided, the capture_erb method
returns the buffer instead of the return value of the block passed
to it. This better handles cases where the template ends in a
conditional:
Thanks,
Jeremy
Beta Was this translation helpful? Give feedback.
All reactions