https://github.com/dgf/crudl-control
coffeescript friendly control CRUD delegate
https://github.com/dgf/crudl-control
Last synced: over 1 year ago
JSON representation
coffeescript friendly control CRUD delegate
- Host: GitHub
- URL: https://github.com/dgf/crudl-control
- Owner: dgf
- License: other
- Created: 2012-03-30T21:20:58.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-04-19T23:31:46.000Z (about 14 years ago)
- Last Synced: 2025-03-05T20:51:48.095Z (over 1 year ago)
- Language: CoffeeScript
- Homepage:
- Size: 95.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CRUDL now express - a websocket CRUD delegate
lifts a [crudl-model](http://github.com/dgf/crudl-model) to the web
map = (person) -> name: person.name
personCrudl = crudl db.Person, map, (p) -> _.extend map(p), id: term.id
everyone.now.yourApp =
# use direct delegate to prevent scope
persons: personCrudl.all
# or apply nowjs scope manually
savePerson: (values, onSuccess) ->
personCrudl.update.apply @, [values.id, values, onSuccess]