angular-sailsjs-boilerplate
angular-sailsjs-boilerplate copied to clipboard
DataModel handler verb 'Deleted' should be 'Destroyed'
By checking the log from DataModel after deleting an object, the console prints
'Implement handling for 'destroyed' socket messages'
I renamed that handler on line 164 for 'handlerDestroyed' instead of 'handlerDeleted', and it now works as expected!
DataModel.prototype.handlerDestroyed = function handlerDestroyed(message) {
// method implementation here
}
I'm testing with delete records in my webapp and find this same issue ('Implement handling for 'destroyed' socket messages'). is this an error? must I make this change in my code? Thanks
I have made this change in line 164 of DataModel.js and work for me. Before this change, the record is deleted but don't work the socket.
I just checked the corresponding docs: http://sailsjs.org/documentation/reference/blueprint-api/destroy
It clearly states that the event triggered is destroy
. Cheers!