OSDN Git Service

fix:view
[pettanr/pettanr.git] / app / assets / javascripts / models / scroll.js.coffee
index ca3f00b..596fb55 100644 (file)
@@ -16,6 +16,9 @@ class Pettanr.Scroll extends Peta.Binder
     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
   \r