Created
December 15, 2010 00:24
-
-
Save zenom/741396 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Status = Backbone.Model.extend({ | |
initialize: function() { | |
this.id = this.attributes._id; | |
} | |
}); | |
StatusCollection = Backbone.Collection.extend({ | |
model: Status, | |
url: '/social/twitter/status', | |
comparator: function(status) { | |
return status.get('created_at'); | |
} | |
}); | |
Statuses = new StatusCollection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Twitter = Status.extend({ | |
initialize: function() { | |
} | |
}) | |
TwitterCollection = StatusCollection.extend({ | |
model: Twitter, | |
url: '/social/twitter/status', | |
}); | |
Tweets = new TwitterCollection; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment