node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org ยป


CRUDL now express - a websocket CRUD delegate

lifts a crudl-model to the web

map = (person) -> name:

personCrudl = crudl db.Person, map, (p) -> _.extend map(p), id: =

  # use direct delegate to prevent scope
  persons: personCrudl.all

  # or apply nowjs scope manually
  savePerson: (values, onSuccess) ->
    personCrudl.update.apply @, [, values, onSuccess]