Skip to content

Instantly share code, notes, and snippets.

@kimjoar
kimjoar / 14.diff
Created July 13, 2012 20:20
Step 14 -> 15
var events = _.clone(Backbone.Events);
var Statuses = function() {
};
Statuses.prototype.add = function(text) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: { text: text },
@kimjoar
kimjoar / 13.diff
Created July 13, 2012 20:20
Step 13 -> 14
var events = _.clone(Backbone.Events);
var Statuses = function() {
};
Statuses.prototype.add = function(text) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: { text: text },
@kimjoar
kimjoar / 12.diff
Created July 13, 2012 20:20
Step 12 -> 13
var events = _.clone(Backbone.Events);
var Statuses = function() {
};
Statuses.prototype.add = function(text) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: { text: text },
@kimjoar
kimjoar / 11.diff
Created July 13, 2012 20:20
Step 11 -> 12
var events = _.clone(Backbone.Events);
var Statuses = function() {
};
Statuses.prototype.add = function(text) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: { text: text },
@kimjoar
kimjoar / 10.diff
Created July 13, 2012 20:19
Step 10 -> 11
var events = _.clone(Backbone.Events);
var Statuses = function() {
};
Statuses.prototype.add = function(text) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: { text: text },
@kimjoar
kimjoar / 9.diff
Created July 13, 2012 20:19
Step 9 -> 10
var events = _.clone(Backbone.Events);
var Statuses = function() {
};
-Statuses.prototype.add = function(options) {
+Statuses.prototype.add = function(text) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
@kimjoar
kimjoar / 8.diff
Created July 13, 2012 20:19
Step 8 -> 9
+var events = _.clone(Backbone.Events);
+
var Statuses = function() {
};
Statuses.prototype.add = function(options) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: { text: options.text },
@kimjoar
kimjoar / 7.diff
Created July 13, 2012 20:17
Step 7 -> 8
var Statuses = function() {
};
Statuses.prototype.add = function(options) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: { text: options.text },
success: options.success
});
@kimjoar
kimjoar / 6.diff
Created July 13, 2012 20:17
Step 6 -> 7
var Statuses = function() {
};
Statuses.prototype.add = function(options) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: { text: options.text },
success: options.success
});
@kimjoar
kimjoar / 5.diff
Created July 13, 2012 20:17
Step 5 -> 6
var Statuses = function() {
};
Statuses.prototype.add = function(options) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: { text: options.text },
success: options.success
});