var Project = new Model('project', function(){ this.persistence(Model.REST, "api/projects"); });
var project = new Project({name:"testing12345"});
project.save();
It will send data like this : {project: {name: "testing12345"} }
yet my backend expect just attributes {name:"testing12345"} . Can this be configured in js-model, or do I have to change my API ?
var Project = new Model('project', function(){ this.persistence(Model.REST, "api/projects"); }); var project = new Project({name:"testing12345"}); project.save();
It will send data like this : {project: {name: "testing12345"} } yet my backend expect just attributes {name:"testing12345"} . Can this be configured in js-model, or do I have to change my API ?
thx