diff --git a/public/javascripts/app/models/post.js b/public/javascripts/app/models/post.js index 3994b760c..a8ddf1c59 100644 --- a/public/javascripts/app/models/post.js +++ b/public/javascripts/app/models/post.js @@ -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 diff --git a/public/javascripts/app/templates/stream-faces.handlebars b/public/javascripts/app/templates/stream-faces.handlebars index 68a752adb..6db001f19 100644 --- a/public/javascripts/app/templates/stream-faces.handlebars +++ b/public/javascripts/app/templates/stream-faces.handlebars @@ -1,5 +1,5 @@ {{#people}} {{#linkToPerson this}} - {{{avatar this "small"}}} + {{{personImage this "small"}}} {{/linkToPerson}} {{/people}}