abuiles / ember-cli-101-errata

18 stars 4 forks source link

page 112 typo ' #199

Closed ChangJoo-Park closed 9 years ago

ChangJoo-Park commented 9 years ago

setObserver: function() {

this.addObserver(article.state', this, this.stateChanged); // article.state with ' ?

// we need to call get on the property so the observers are setup

// see for more info http://cl.ly/1f0Y1v2A1G04

this.get('article').get('state');

}.on('init'),

stateChanged: function() {

if (this.get(article.isDirty') && !this.get(article.isSaving')) {

Ember.run.once(this, this.autoSave);

}

}

abuiles commented 9 years ago

I simplified this in today's release, thanks!