-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed Backbone.couch_connector.update to use $.couch.db.updateDoc #43
base: master
Are you sure you want to change the base?
Conversation
Looks good to me, but can you merge in latest master first and then run the tests? (https://github.com/janmonschke/backbone-couchdb/blob/master/test/readme.md) |
Tests are passing, but I'd like to add some more. |
- Add tests for using the update function w/ an update handler. - Update test/testrunner/src/jquery.couch.js to https://github.com/daleharvey/jquery.couch.js - Move updateFun from options to the model. - Allow user to update all model attributes or just ones passed to model.save
I've add more tests and moved the updateFun from opts to the model. I think this is more intuitive, but if you have other suggestions I'd love to hear them. |
Another option is to add |
That's another option, we could do that. Let's try with including the function. |
Would you like it added to |
I decided not to include it b/c |
Changed my mind. Now there is a check in |
Conflicts: backbone-couchdb.js
This reverts commit 0267275. Conflicts: backbone-couchdb.coffee backbone-couchdb.js
Referencing Issue #42, this change allows the use of CouchDB's update handlers.
Usage:
I'm also interested in having Backbone.couch_connector.create call this function if the user provides an "updateFun" option.