Sha256: 15f5ef797bdf15597829ef13281c7676c33c623f615104ad0ceeab629bf3b66d

Contents?: true

Size: 367 Bytes

Versions: 7

Compression:

Stored size: 367 Bytes

Contents

<%= view_namespace %> ||= {}

class <%= view_namespace %>.<%= singular_name.camelize %>View extends Backbone.View
  template: JST["<%= jst singular_name %>"]

  events:
    "click .destroy" : "destroy"

  tagName: "tr"

  destroy: () ->
    @model.destroy()
    this.remove()

    return false

  render: ->
    @$el.html(@template(@model.toJSON() ))
    return this

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
bbr-wsm-1.1.0 lib/generators/backbone/scaffold/templates/views/model_view.coffee
rails-backbone-1.2.0 lib/generators/backbone/scaffold/templates/views/model_view.coffee
railsy_backbone-0.0.5 lib/generators/backbone/scaffold/templates/views/model_view.coffee
railsy_backbone-0.0.4 lib/generators/backbone/scaffold/templates/views/model_view.coffee
railsy_backbone-0.0.3 lib/generators/backbone/scaffold/templates/views/model_view.coffee
rails-backbone-0.9.10 lib/generators/backbone/scaffold/templates/views/model_view.coffee
rails-backbone-0.9.0 lib/generators/backbone/scaffold/templates/views/model_view.coffee