Skip to content

@jayphelps /gist:5915411
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ember.hasMany upgrades.
Ember.HasManyArray.serialize = function (hasManyArray) {
return hasManyArray.get('content');
};
Ember.hasMany = function (klassOrString, key) {
return Ember.computed(function () {
var klass;
if (typeof klassOrString === "string") {
klass = Ember.get(Ember.lookup, klassOrString);
} else {
klass = klassOrString;
}
return Ember.HasManyArray.create({
parent: this,
modelClass: klass,
content: get(this, 'data.' + key)
});
}).property().meta({ isAttribute: true, type: Ember.HasManyArray });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.