Created
August 4, 2014 16:07
-
-
Save ghempton/be43107bf626284df9dc 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
/** | |
Attempting to create a subclass of `Model` that supports | |
CP's and Ember.Observable. | |
*/ | |
function EmberModel() { | |
Model.apply(this, arguments); | |
return CoreObject.apply(this); | |
} | |
var PrototypeMixin = Model.prototype; | |
CoreObject.PrototypeMixin.apply(PrototypeMixin); | |
PrototypeMixin.ownerConstructor = EmberModel; | |
EmberModel.PrototypeMixin = PrototypeMixin; | |
var ClassMixin = Model; | |
CoreObject.ClassMixin.apply(ClassMixin); | |
ClassMixin.ownerConstructor = EmberModel; | |
ClassMixin.apply(EmberModel); | |
EmberModel.ClassMixin = ClassMixin; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment