X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Fmodels%2Fstory.js.coffee;h=df372475f18b04bc9ab2dbc181838db1df3a24c5;hb=dc5fe0b8ebfbde443317df9e2c18aa0deacd471d;hp=4d171704c8fd13ff7d28f6bb8e4d3480f88e854e;hpb=160cfe90adb0a44dd3cdc02962cb5326d2a11585;p=pettanr%2Fpettanr.git diff --git a/app/assets/javascripts/models/story.js.coffee b/app/assets/javascripts/models/story.js.coffee index 4d171704..df372475 100644 --- a/app/assets/javascripts/models/story.js.coffee +++ b/app/assets/javascripts/models/story.js.coffee @@ -13,6 +13,9 @@ class Pettanr.Story extends Peta.Binder author_id: null } + author: () -> + new Pettanr.Author({id: @get('author_id')}) + is_visible: (operators) -> switch super(operators) when null @@ -26,6 +29,3 @@ class Pettanr.Story extends Peta.Binder if @id @url = @url + @id -class Pettanr.Story.Collection extends Backbone.Collection - model: Pettanr.Story - url: '/stories'