Closed jbinto closed 9 years ago
On page 14, we have the following code snippet:
export default ApplicationAdapter.extend({ buildURL: function(type, id , record) { return '/friends/' + record.get('friend.id') + '/articles/' + id; } });
This makes JSHint complain:
adapters/article.js: line 1, col 16, 'ApplicationAdapter' is not defined.
At that point, I just made the compiler happy by adding
import ApplicationAdapter from 'ember'; // wrong, but it compiles
But by the time I made it to Page 61, where you attempt to do this in the console:
$E.get('articles').createRecord({description: 'foo'})
I got a hard-to-track-down Uncaught TypeError: undefined is not a function.
Uncaught TypeError: undefined is not a function
I now realize that the correct thing to do in article.js is:
article.js
import ApplicationAdapter from './application';
So page 14 should be updated with that import.
See #172. ArticleAdapter isn't actually supposed to be implemented.
ArticleAdapter
On page 14, we have the following code snippet:
This makes JSHint complain:
At that point, I just made the compiler happy by adding
But by the time I made it to Page 61, where you attempt to do this in the console:
I got a hard-to-track-down
Uncaught TypeError: undefined is not a function
.I now realize that the correct thing to do in
article.js
is:So page 14 should be updated with that import.