Skip to content

Instantly share code, notes, and snippets.

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