Skip to content
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

Align few places to match with possible overriding of Backbone.sync #3582

Closed
wants to merge 1 commit into from

Commits on Apr 28, 2015

  1. Align few places in code to match with possible overriding of Backbon…

    …e.sync
    
    Overriding Backbone.sync is a great way to switch a persistence layer. It just lacks two moments that should be overridable too:
    
    * Result of `model.save` if model was not validated
    * Result of `model.destory` if model was new
    
    For example if my implementation of Backbone.sync returns promises, then current implementation forces me to check the result before calling '.then()'. With the proposed changes, we will be able to unify `sync` behavior with the rest of the Backbone.
    
    @jashkenas ?
    Artazor committed Apr 28, 2015
    Configuration menu
    Copy the full SHA
    571c54c View commit details
    Browse the repository at this point in the history