OSDN Git Service

fix sign in,out
[pettanr/pettanr.git] / app / assets / javascripts / models / story.js.coffee
index 4d17170..df37247 100644 (file)
@@ -13,6 +13,9 @@ class Pettanr.Story extends Peta.Binder
     author_id: null\r
   } \r
   \r
+  author: () ->\r
+    new Pettanr.Author({id: @get('author_id')})\r
+  \r
   is_visible: (operators) ->\r
     switch super(operators)\r
       when null\r
@@ -26,6 +29,3 @@ class Pettanr.Story extends Peta.Binder
     if @id\r
       @url = @url + @id\r
   \r
-class Pettanr.Story.Collection extends Backbone.Collection\r
-  model: Pettanr.Story\r
-  url: '/stories'\r