Skip to content

Instantly share code, notes, and snippets.

Avatar

Dmitry (dio) Levashov dio-el-claire

View GitHub Profile
View EmberModel_belongsTo_fix
var get = Ember.get;
Ember.Model.reopen({
getBelongsTo: function(key, type, meta, store) {
var idOrAttrs = get(this, '_data.' + key),
record;
if (Ember.isNone(idOrAttrs)) {
return null;
}