Sha256: 22e7b735927c5037b9d32131394ce2c9fdddd6c0dce0787e7bebc91dfea06c5f

Contents?: true

Size: 415 Bytes

Versions: 4

Compression:

Stored size: 415 Bytes

Contents

class <%= model_namespace %> extends Backbone.Model
  paramRoot: '<%= singular_table_name %>'
  urlRoot: '/pbw/items/<%= class_name%>'

  defaults:
    name: null
    _type: '<%= class_name%>'
<% attributes.each do |attribute| -%>
    <%= attribute.name %>: null
<% end -%>

class <%= collection_namespace %>Collection extends Backbone.Collection
  model: <%= model_namespace %>
  url: '/pbw/items/<%= class_name%>'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pbw-0.0.8 lib/generators/pbw/item/templates/model.coffee
pbw-0.0.7 lib/generators/pbw/item/templates/model.coffee
pbw-0.0.6 lib/generators/pbw/item/templates/model.coffee
pbw-0.0.5 lib/generators/pbw/item/templates/model.coffee