Skip to content

Instantly share code, notes, and snippets.

@teddyzeenny
Last active December 20, 2015 13:29
Show Gist options
  • Save teddyzeenny/6139118 to your computer and use it in GitHub Desktop.
Save teddyzeenny/6139118 to your computer and use it in GitHub Desktop.
_debugInfo format
propertyInfo: {
// include other mixins/properties not listed here
includeOtherProperties: true,
// do not display these properties
skipProperties: ['toString', 'send', 'withTransaction'],
// do not display these mixins along with their properties
skipMixins: [ 'Ember.Evented'],
// don't calculate these CPs automatically (unless cached)
expensiveProperties: ['maritalStatus', 'avatar'],
groups: [
{
name: 'Attributes',
properties: [ 'id', 'firstName', 'lastName' ],
expand: true // open by default
},
{
name: 'Belongs To',
properties: [ 'maritalStatus', 'avatar' ],
expand: true
},
{
name: 'Has Many',
properties: [ 'phoneNumbers' ],
expand: true
},
{
name: 'Flags',
properties: ['isLoaded', 'isLoading', 'isNew', 'isDirty']
}
]
}
/* Result:
Attributes
=========
id: 1
firstName: Teddy
lastName: Zeenny
Belongs To
==========
maritalStatus: <App.MaritalStatus:ember1234>
avatar: <App.Avatar:ember1233>
Has Many
=======
phoneNumber: <DS.ManyArray:ember2297>
Flags
=======
isLoading: false
isLoaded: true
isNew: false
isDirty: false
Own Properties
==============
name: 'Teddy Zeenny'
store: <App.Store:ember2176>
transaction: <DS.Transaction:ember2177>
DS.Model
========
clientId: null
stateManager: null
errors: null
serialize: function() {..}
... etc
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment