Roda 3.67.0 Released #319
jeremyevans
started this conversation in
General
Replies: 1 comment 1 reply
-
Very cool, I can immediately think of some use cases for this. 👍 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Roda 3.67.0 has been released!
New Feature
A custom_block_results plugin has been added for custom handling
of block results. This allows routing blocks to return
arbitrary objects instead of just String, nil, and false, and
to have custom handling for them. For example, if you want to
be able to have your routing blocks return the status code to use,
you could do:
While the expected use of the handle_block_result method is with
class arguments, you can use any argument that implements an
appropriate === method.
The symbol_views and json plugins, which support additional block
results, now use the custom_block_results plugin internally.
Thanks,
Jeremy
Beta Was this translation helpful? Give feedback.
All reactions