This commit is contained in:
Matthew Riley MacPherson 2014-05-31 13:05:48 -04:00
Родитель 7e1c9a7f58
Коммит 49d9fe4d37
2 изменённых файлов: 22 добавлений и 13 удалений

Просмотреть файл

@ -15,18 +15,23 @@ HighFidelity.Episode = DS.Model.extend({
isPlaying: false,
isDownloaded: function() {
return this.get('audioFile') !== null && this.get('audioFile') !== undefined;
return (this.get('audioFile') !== null &&
this.get('audioFile') !== undefined);
}.property('audioFile')
});
// probably should be mixed-in...
HighFidelity.Episode.reopen({
attributes: function(){
var model = this;
return Ember.keys(this.get('data')).map(function(key){
return Ember.Object.create({ model: model, key: key, valueBinding: 'model.' + key });
});
}.property()
attributes: function(){
var model = this;
return Ember.keys(this.get('data')).map(function(key){
return Ember.Object.create({
model: model,
key: key,
valueBinding: ' model.' + key
});
});
}.property()
});
// delete below here if you do not want fixtures

Просмотреть файл

@ -107,12 +107,16 @@ HighFidelity.Podcast = DS.Model.extend({
// probably should be mixed-in...
HighFidelity.Podcast.reopen({
attributes: function(){
var model = this;
return Ember.keys(this.get('data')).map(function(key){
return Ember.Object.create({ model: model, key: key, valueBinding: 'model.' + key });
});
}.property()
attributes: function(){
var model = this;
return Ember.keys(this.get('data')).map(function(key){
return Ember.Object.create({
model: model,
key: key,
valueBinding: ' model.' + key
});
});
}.property()
});
// delete below here if you do not want fixtures