Commits

Anonymous committed 6b0ec5c

Added id to Comment.

  • Participants
  • Parent commits 14e778c

Comments (0)

Files changed (1)

             });
   db.create('Comment',
             {
+              id: 'unique serial',
               post: 'integer -> Post.id',
               author: 'string',
               date: 'date',
 var BlogHandler = IndexHandler.subclass(
   {
     get: function (request, author) {
-      var posts = rv.Post.where({author: author}).get({by: '-date'});
+      var posts = rv.Post.where({author: author}).get({by: '-id'});
       if (!posts.length && request.user != author)
         throw NotFound(author + ' doesn\'t have a blog');
       return render('blog.html',
         {
           request: request,
           post: this._post,
-          comments: rv.Comment.where({post: this._post.id}).get({by: 'date'})
+          comments: rv.Comment.where({post: this._post.id}).get({by: 'id'})
         });
     },