You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds an array of objects to the prototype of the given Model. If a function is given it is invoked with the Model and options expecting an object to be returned.
Example:
functionTraitGenerator(model,options){return{traitFunction: function(){// this = model instance}}}varMyTrait={sharedFunction: function(){this.set({done: true,done_at: Rekord.now()});returnthis.save();}};varTask=Rekord({name: 'task',fields: ['name','done','done_at'],traits: [MyTrait,TraitGenerator]});
The text was updated successfully, but these errors were encountered:
Adds an array of objects to the prototype of the given Model. If a function is given it is invoked with the Model and options expecting an object to be returned.
Example:
The text was updated successfully, but these errors were encountered: