Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add your own custom mixin
'use strict';
module.exports = function(Model, options) {
Model.observe('before save', addConsoleLog);
let addConsoleLog = function(ctx, next) {
if (ctx.instance) {
console.log("Model instance is", ctx.instance);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.