<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)
更新を行うか、別のビューから移動する場合にのみ機能します。