Get content of promise returned by helper


#1

Hello,

does anyone knows how to fulfil a promise which is returned by a helper? For example:

That is my helper:

import Ember from 'ember';
import DS from 'ember-data';

export function getTranslation (params) {

  return DS.PromiseObject.create({

    promise: params[0].get('translations').then(translations => {

              return translations.get('firstObject').get('id');

            })

  });

}

export default Ember.HTMLBars.makeBoundHelper(getTranslation);

Within my template:

{{getTranslation model}}