engine/app/assets/javascripts/locomotive/utils/handlebar_helpers.js.coffee

9 lines
178 B
CoffeeScript
Raw Permalink Normal View History

Handlebars.registerHelper 'each_with_index', (context, block) ->
ret = ""
for num in context
data = context[num]
data._index = num
ret = ret + block(data)
ret