Order posts by submitted as we render them.

We still want them ordered by score when we publish (so we only see the highest scored). But we want to order them with a fixed order when we render so that when the score changes we can animate them around without DOM nodes being repositioned.
This commit is contained in:
Tom Coleman 2012-09-12 10:12:06 +10:00
parent fe3a349a8e
commit f8b540dd03

View file

@ -3,7 +3,7 @@ Template.top.show = function(){
};
Template.top.posts = function(){
var posts = Posts.find({}, {sort: {score: -1}});
var posts = Posts.find({}, {sort: {submitted: -1}});
return posts;
};