Given this controller:
export default Ember.Controller.extend({
isUserAttending: function(){
var le = this.get('model');
this.get('session.user.listingEvents')
.then(function(les){
var exists = false;
les.forEach(function(current){
if (current.id == le.id) {
exists = true;
}
});
return exists;
});
}.property('session.user.listingEvents')
});
why when i do this in my template:
{{log isUserAttending}}
do i get:
undefined
in my console.
but when debugging I can see that the isUserAttending
method is being called and returns the correct values?