Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
@helper and optional parameters #41
This just bit me, and I'm wondering why is this necessary:
apply_helpers = (ctx) -> for name, helper of helpers do (name, helper) -> if typeof helper is 'function' ctx[name] = (args...) -> args.push ctx # ??? helper.apply ctx, args else ctx[name] = helper ctx
Why do we need to add the context to the arguments? It's already available as, you know, the context.
It's very difficult to use optional arguments with this, and it's not documented.
That's actually a good question already pointed out in mauricemach/zappa#99 and I honestly have no proper answer, although I suspect this might be have been related to setting
My proposal is to:
(Since I was the one who asked for
We can keep