Created
December 17, 2012 15:34
-
-
Save svparijs/4319161 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
App.Person = DS.Model.extend({ | |
firstName: DS.attr('string'), | |
lastName: DS.attr('string'), | |
fullName: function() { | |
return this.get('firstName') + ' ' + this.get('lastName'); | |
}.property('firstName', 'lastName'), | |
didLoad: function() { | |
console.log(this.get('fullName') +" finished loading."); | |
}, | |
isDiry: function() { | |
App.store.commit(); | |
}.observes('completed') | |
}); | |
App.Person = DS.Model.reopen({ | |
namingConvention: { | |
keyToJSONKey: function(key) { | |
return key; | |
}, | |
foreignKey: function(key) { | |
return key; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment