Skip to content

Instantly share code, notes, and snippets.

@oak-tree
Created March 6, 2013 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oak-tree/5099486 to your computer and use it in GitHub Desktop.
Save oak-tree/5099486 to your computer and use it in GitHub Desktop.
save:function (nousevar,settings) {
//var url = this.parentType + '/' + this.parentId + '/' + this.innerObjectType + 's' + '/add/' + innerObjectId
url = this.urlRoot();
//var url = "keyword/" + this.id + "/superKeywords/add/" + superId
console.log('add relation between ' + this.parentId + ' and ' + this.id);
var self = this;
var mustSettings = {
url : url,
dataType : "json",
processData: false,
type : "PUT",
data : JSON.stringify(this.getWhiteListAttributes()),
}
$.extend(settings, mustSettings)
$.ajax(settings);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment