Skip to content

Instantly share code, notes, and snippets.

@tomlagier
Created November 11, 2014 23:23
Show Gist options
  • Save tomlagier/9cdad499ca0a3a254360 to your computer and use it in GitHub Desktop.
Save tomlagier/9cdad499ca0a3a254360 to your computer and use it in GitHub Desktop.
function Day( steps, date ){
return Backbone.Model.extend({
//Set defaults
defaults: {
id : null,
steps: 100,
date : moment().format( 'YYYY-MM-DD H:mm:ss' )
},
initialize: function(){
//Do stuff?
},
//Custom parse function
parse : function( response ){
return response.days;
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment