This PR fixes rules being unable to be defined using a closure as defined in the Volt documentation.
By evaluating the closure we can get the defined rules, which then get merged into the rules like normal.
I opted not to use a ternary for the is_callable function call for readability. If you want this to be a ternary, let me know and I'll push a commit for that.
I also see that the tests are failing, I was able to reproduce that locally and fixed it by creating workbench/resources/views directory (mkdir -p workbench/resources/views from the project). Would you like me to add that to this branch or rather have a separate branch for that?
This PR fixes rules being unable to be defined using a closure as defined in the Volt documentation.
By evaluating the closure we can get the defined rules, which then get merged into the rules like normal.
I opted not to use a ternary for the
is_callable
function call for readability. If you want this to be a ternary, let me know and I'll push a commit for that.I also see that the tests are failing, I was able to reproduce that locally and fixed it by creating
workbench/resources/views
directory (mkdir -p workbench/resources/views
from the project). Would you like me to add that to this branch or rather have a separate branch for that?Fixes #66