DG MS; comments are back!

This commit is contained in:
danielgrippi 2012-02-27 12:29:09 -08:00
parent 896c098a07
commit ebe7a302b6
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,12 @@
app.models.Post = Backbone.Model.extend({
urlRoot : "/posts",
initialize : function() {
this.setupCollections();
this.bind("change", this.setupCollections, this)
},
setupCollections: function() {
this.comments = new app.collections.Comments(this.get("comments") || this.get("last_three_comments"), {post : this});
this.likes = new app.collections.Likes([], {post : this}); // load in the user like initially
this.participations = new app.collections.Participations([], {post : this}); // load in the user like initially

View file

@ -1,5 +1,5 @@
{{#people}}
{{#linkToPerson this}}
{{{avatar this "small"}}}
{{{personImage this "small"}}}
{{/linkToPerson}}
{{/people}}