Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


*WARNING* Sequelize Upgrade to V4 Does NOT Use Instance Methods

Hey everyone! This video is outdated, so before you console.log yourselves crazy, check out the Sequelize docs about v4 wherein what were formally called classMethods and instanceMethods are added to any given Model like this:

// Class Methods
  Article.associate = function(models) {
        // associations can be defined here

//Instance Methods
  Article.prototype.publishedAt = function() {
    return dateFormat(this.createdAt, "dddd, mmmm dS, yyyy, h:MM TT");

  Article.prototype.shortDescription = function() {
    return this.body.length > 30 ? this.body.substr(0, 30) + "..." : this.body;

Here is the docs page with an example: http://docs.sequelizejs.com/manual/tutorial/upgrade-to-v4.html