class Pettanr.Scroll extends Peta.Binder\r
- url: '/scrolls/'\r
\r
@singular: () ->\r
'Scroll'\r
visible: 0\r
} \r
\r
- author: () ->\r
- new Pettanr.Author({id: @get('author_id')})\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
- initialize: () ->\r
- if @id\r
- @url = @url + @id\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
-class Pettanr.Scroll.Collection extends Backbone.Collection\r
- model: Pettanr.Scroll\r
- url: '/scrolls'\r