In Sails' Waternline I need to be able to compare the previous value with the new one and assign a new attribute under some condition. For example:
beforeUpdate: function(newValues, callback) {
if(/* currentValues */.age > newValues.age) {
newValues.permission = false;
}
}
How could I access the currentValues
?