Closed macfeaster closed 7 years ago
you can fixed it changing the following at index.js:
module.exports = function(sails) { //patch sails model //to add custom errors message //logic function patch() { sails .util ._ .forEach(sails.models, function(model) { //bind path validate //on concrete models //and left derived model //build from associations if (model.globalId) {
TO
module.exports = function(sails) { //patch sails model //to add custom errors message //logic function patch() { //Hebert Update: sails.util._ doesnt exist anymore at v1.x Object.keys(sails.models).forEach(function (model){ //bind path validate //on concrete models //and left derived model //build from associations if (model.globalId) {
Replace sails.util._forEach with Object.keys(sails.models).forEach
Thanks for a great plugin!
With Sails 1.0, the plugin fails. These are the errors I have encountered so far:
sails.__ is not a function
- I do not know why this doesn't work, since it's still in the documentationThe first should be easily fixed by changing from the Sails built-in lodash to your own instance. Not sure about the second one though.