Created
November 11, 2014 23:23
-
-
Save tomlagier/9cdad499ca0a3a254360 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
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