Skip to content

Event for when attr's get changed and saved to the database

Notifications You must be signed in to change notification settings

modella/change-saved

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modella-change-saved

Adds a attr change saved for modella.

Usage Example

var modella = require('modella'),
    changeSavedEvent = require('modella-change-saved');

var User = modella('User')
            .attr('username');

User.use(changeSavedEvent);


User.on('username change saved', function(user, username) {
  // Update some other records or do whatever else you want.
});

About

Event for when attr's get changed and saved to the database

Resources

Stars

Watchers

Forks

Packages

No packages published