Use correct bound helper params#3410
Conversation
There was a problem hiding this comment.
Bound helpers only get params and hash (the first two args).
There was a problem hiding this comment.
You should likely put the args in comments (otherwise the JSHint tests will blow up after generating):
export function <%= camelizedModuleName %>(/* params, hash, options, env */) {
}And I think that the generate tests will also need to be updated.
There was a problem hiding this comment.
@rwjblue I'm a little confused, all the helpers I see in core have 4 params. Can you point me to some documentation on this?
There was a problem hiding this comment.
Helpers in core are not using Ember.HTMLBars.makeBoundHelper, since they are not bound helpers.
Documentation is here:
|
@rwjblue Does it look okay now? |
Use correct bound helper params
|
I think this will make the default helper test not pass: https://github.com/ember-cli/ember-cli/blob/master/blueprints/helper-test/files/tests/unit/helpers/__name__-test.js |
|
@kimroen - You are correct, mind submitting a PR? |
|
@rwjblue Done :) |
No description provided.