Trying to get the id of a saved model
var newBookmark = bookmarks.create(values,{
success:function(){
console.log('Successfuly saved')
console.log(idOfThisModel) //need id from the server here
this.close()
},
error: function(){console.log('error, didnt save')},
})
How can I get the id of the model into the success method?
You need to pass it as function param: