Sha256: ea65f23439d520c67fee7e283ce02ba79a963ff6d6673c53e95f0dba7c8cccc0

Contents?: true

Size: 394 Bytes

Versions: 1

Compression:

Stored size: 394 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: ->
    $(this.el).html(@template(@model.toJSON() ))    
    return this

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails-backbone-0.5.4 lib/generators/backbone/scaffold/templates/views/model_view.coffee