class Pettanr.Author extends Peta.Owner url: '/authors/' @singular: () -> 'Author' @plural: () -> 'Authors' defaults: { id: null, name: 'no name' } name_view: (length = null) -> new Pettanr.Views.Author.Name({item: this, length: length}) initialize: () -> if @id @url = @url + @id class Pettanr.Author.Collection extends Backbone.Collection model: Pettanr.Author url: '/authors'