OSDN Git Service

fix event names
[pettanr/pettanr.git] / app / assets / javascripts / models / story.js.coffee
index df37247..6d5482f 100644 (file)
@@ -16,6 +16,11 @@ class Pettanr.Story extends Peta.Binder
   author: () ->\r
     new Pettanr.Author({id: @get('author_id')})\r
   \r
+  overwrite: (options) ->\r
+    operators = options.operators\r
+    return false if not operators.author\r
+    @set('author_id', operators.author.id)\r
+  \r
   is_visible: (operators) ->\r
     switch super(operators)\r
       when null\r