Sha256: b57f8b6fd4fc15bff631314b034d7e8fe6153d98518bb30a3f47514b8714163f
Contents?: true
Size: 562 Bytes
Versions: 6
Compression:
Stored size: 562 Bytes
Contents
<%= view_namespace %> ||= {} class <%= view_namespace %>.EditView extends Backbone.View template: JST["<%= jst 'edit' %>"] events: "submit #edit-<%= singular_name %>": "update" update: (e) -> e.preventDefault() e.stopPropagation() @options.model.save(null, success:(model) => @options.model = model window.location.hash = "/#{@options.model.id}" ) render: -> $(this.el).html(this.template(@options.model.toJSON() )) this.$("form").backboneLink(@options.model) return this
Version data entries
6 entries across 6 versions & 1 rubygems