Skip to content

Instantly share code, notes, and snippets.

@danmartens
Created November 1, 2013 13:41
Show Gist options
  • Save danmartens/7265608 to your computer and use it in GitHub Desktop.
Save danmartens/7265608 to your computer and use it in GitHub Desktop.
Ember Helpers
Ember.Handlebars.registerBoundHelper 'pluralize', (number, singular, plural) ->
unless Ember.typeOf(plural) is 'string'
plural = "#{singular}s"
return if number is 1 then singular else plural
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment