Skip to content

Instantly share code, notes, and snippets.

@admc
Created July 28, 2013 23:22
Show Gist options
  • Save admc/6100688 to your computer and use it in GitHub Desktop.
Save admc/6100688 to your computer and use it in GitHub Desktop.
Conversations round 2
var User = function () {
//stuff
this.hasMany('Conversations');
this.hasMany('Messages', {through: 'Conversations'});
};
var Conversation = function () {
//message things
this.hasMany('Users', {through: 'Messages'});
};
var Message = function () {
//conversation things
//does this have any associations?
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment