refactored article to workout

This commit is contained in:
2013-01-18 13:53:18 -05:00
parent ea579b5ab0
commit dd0268e765
23 changed files with 137 additions and 132 deletions

View File

@@ -7,8 +7,8 @@ var UserSchema = new mongoose.Schema({
is_admin: {type: Boolean, 'default': false }
});
UserSchema.methods.recentArticles = function(callback) {
return this.model('Article')
UserSchema.methods.recentworkouts = function(callback) {
return this.model('workout')
.find({author: this._id})
//.sort('created_at', 1)
.limit(5)