<span class="badge badge-inverse">{{kudosReceivedNum user.kudoReceiveds}}</span>
Ember.Handlebars.registerBoundHelper 'kudosReceivedNum', (kudos, options) ->
kudosTotal = 0
if kudos
kudos.forEach (item) ->
kudosTotal += item.get 'value'
kudosTotal
申请路线:
newKudo = Sks.KudoReceived.createRecord value: kudoNum, comment: kudoComment
user.get('kudoReceiveds').pushObject(newKudo)
它仅在我进行刷新或从另一个视图转到时才有效。