OSDN Git Service

fix: view system2
[pettanr/pettanr.git] / app / assets / javascripts / models / scroll.js.coffee
index 2bfb905..596fb55 100644 (file)
@@ -1,5 +1,4 @@
 class Pettanr.Scroll extends Peta.Binder\r
-  url: '/scrolls/'\r
   \r
   @singular: () ->\r
     'Scroll'\r
@@ -12,16 +11,14 @@ class Pettanr.Scroll extends Peta.Binder
     visible: 0\r
   } \r
   \r
-  author: () ->\r
-    new Pettanr.Cache.Retriever(Pettanr.Author, @get('author_id'))\r
-  \r
   overwrite: (options) ->\r
     operators = Pettanr.cache.operators\r
     return false if not operators.author\r
     @set('author_id', operators.author.id)\r
   \r
+  short: (column_name, length = 12) ->\r
+    _.escape(Pettanr.truncate(@get(column_name), length))\r
+  \r
   initialize: (attr = {}, options = {}) ->\r
     super(attr, options)\r
-    if @id\r
-      @url = @url + @id\r
   \r