-
-
Save CodeOfficer/2818c6e8de7f396c886e 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
// A fix for the ember chrome extension so that we can peek into the data store | |
// see https://github.com/stefanpenner/ember-app-kit/issues/263#issuecomment-28482992 | |
/* global require */ | |
export default DS.DebugAdapter.reopen({ | |
getModelTypes: function() { | |
var self = this; | |
return Ember.keys(requirejs._eak_seen).filter(function(key) { | |
return !!key.match(/^appkit\/models\//) && self.detect(require(key)['default']); | |
}).map(function(key){ | |
var type = require(key)['default']; | |
var typeKey = key.match(/^appkit\/models\/(.*)/)[1]; | |
type.toString = function() { return typeKey; }; | |
return type; | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment