OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / assets / javascripts / models / comic.js.coffee
index de7a441..de9689b 100644 (file)
@@ -1,5 +1,4 @@
 class Pettanr.Comic extends Peta.Binder\r
-  url: '/comics/'\r
   \r
   @singular: () ->\r
     'Comic'\r
@@ -13,10 +12,7 @@ class Pettanr.Comic extends Peta.Binder
     author_id: null\r
   } \r
   \r
-  author: () ->\r
-    new Pettanr.Cache.Retriever(Pettanr.Author, @get('author_id'))\r
-  \r
-  is_visible: (operators) ->\r
+  is_visible: (operators = Pettanr.cache.operators) ->\r
     switch super(operators)\r
       when null\r
         return true\r
@@ -26,13 +22,12 @@ class Pettanr.Comic extends Peta.Binder
         @get('visible') > 0\r
   \r
   overwrite: (options) ->\r
-    operators = options.operators\r
+    operators = Pettanr.cache.operators\r
     return false if not operators.author\r
     @set('author_id', operators.author.id)\r
   \r
   symbol_filename: () ->\r
   \r
-  initialize: () ->\r
-    if @id\r
-      @url = @url + @id\r
+  initialize: (attr = {}, options = {}) ->\r
+    super(attr, options)\r
   \r