Skip to content

Instantly share code, notes, and snippets.

View KrisJordan's full-sized avatar

Kris Jordan KrisJordan

View GitHub Profile
@KrisJordan
KrisJordan / backbone-question.coffee
Created February 6, 2011 04:58
What is Backbone's idiomatic way to create/save valid models?
Backbone = require 'backbone'
Backbone.sync = ->
console.log 'Sync called.'
Book = Backbone.Model.extend
validate: ->
console.log 'Validate called.'
return "error"
@KrisJordan
KrisJordan / test.coffee
Created February 2, 2011 19:50
Leading space throws off compilation
console.log "Hello"
console.log "World"
# Compiles to
(function() {
console.log("Hello");
}).call(this);
hello, github