I'm having trouble with Ember.HTMLBars.makeBoundHelper. I ran ember g helper format-date, which emitted app/helpers/format-date.js (see below). Note that it uses Ember.HTMLBars.makeBoundHelper. The helper function expects a Date and a format String.
When I render the template (see below), the helper receives instead
- an
Arrayof the form[ Sat Feb 28 2015 16:00:00 GMT-0800 (PST), "MMMM YYYY" ] - an empty
Object - an
Objectof the form{ morph: Morph } - an
Objectof the form{ data: Object, dom: DOMHelper, helpers, Object, hooks: Object, useFragmentCache: true: view: undefined }
If I change Ember.HTMLBars.makeBoundHelper to Ember.Handlebars.makeBoundHelper, the helper function receives
- a
Date "MMMM YYYY"
Tracing the call stack back a bit, I hit https://github.com/emberjs/ember.js/blob/v1.11.0/packages/ember-htmlbars/lib/system/make_bound_helper.js#L70, with fn === formatDate
Even if you say that helpers registered with
Ember.HTMLBars.makeBoundHelperare supposed to take a single argument and an optional hash, there's still theArrayproblem. That is, if I change the helper toand the call to
then
datewould be[ Sat Feb 28 2015 16:00:00 GMT-0800 (PST) ], which isn't right.