Skip to content

Instantly share code, notes, and snippets.

@kayue
Created June 30, 2015 15:11
Show Gist options
  • Save kayue/7d70cf89a6fb751629a3 to your computer and use it in GitHub Desktop.
Save kayue/7d70cf89a6fb751629a3 to your computer and use it in GitHub Desktop.
Posts.views.add("latest", function (terms) {
return {
options: {sort: {lastCommentedAt: -1}}
};
});
Posts.controllers.latest = Posts.controllers.list.extend({
view: "latest"
});
Router.route('/latest', {
name: 'posts_latest',
controller: Posts.controllers.latest
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment