How to define instance methods for models with sails.js
问题 How can I define functions/instance method for objects in Sails ? In Waterline doc (https://github.com/balderdashy/waterline) they say: var User = Waterline.Collection.extend({ ... attributes: { ... // You can also define instance methods here fullName: function() { return this.firstName + ' ' + this.lastName } }, } But when I try do define an instance method in attributes in a model in Sails, the function is not added to the object. Am I doing something wrong ? Environment: Sails (v0.8.94),