DG MS; comments are back!
This commit is contained in:
parent
896c098a07
commit
ebe7a302b6
2 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{#people}}
|
||||
{{#linkToPerson this}}
|
||||
{{{avatar this "small"}}}
|
||||
{{{personImage this "small"}}}
|
||||
{{/linkToPerson}}
|
||||
{{/people}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue