Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Model save parameters

$
0
0
If the following following adds action to the querystring then I think that's your answer:
  1. modelInstance.save({action: 'publish'}) 

Otherwise can't you just define update as a function as such:

  1. update: function(params) {
        
        return can.ajax({
            url: '/api/documents/{id}',
            type: 'PUT',
            data: params,
            dataType: 'json'
        });
    }

Viewing all articles
Browse latest Browse all 3491

Trending Articles