Skip to content

Instantly share code, notes, and snippets.

@towski
Created March 26, 2015 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save towski/d90816a64c3357468ed5 to your computer and use it in GitHub Desktop.
Save towski/d90816a64c3357468ed5 to your computer and use it in GitHub Desktop.
class HomeBase.Models.Role extends Backbone.SuperModel
paramRoot: 'role'
urlRoot: '/roles'
class HomeBase.Collections.RolesCollection extends Backbone.Collection
model: HomeBase.Models.Role
comparator: (role)->
if role.isNew() then '' else role.get('name').toLowerCase()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment