Closed jbinto closed 9 years ago
Looking at the github repo (https://github.com/abuiles/borrowers/) I don't see the custom article.js
adapter actually being used, even in earlier commits.
Was this just for illustrative purposes, to show adapter loading order? If so I would recommend removing it entirely, or at least making it very clear that it's not supposed to be kept.
I am now at Page 66, before adding validation. I'm getting the same error trying to save actually clicking the Save button as I was in the console, above.
Console:
Failed to load resource: the server responded with a status of 404 (Not Found)
Ember server:
POST /friends/725/articles/null 404 186.258 ms - 36
See #172. ArticleAdapter
isn't actually supposed to be implemented.
On page 61, when I run:
I don't get the expected error from the book:
Error: The backend rejected the commit because it was invalid: {state: can't be \ blank,is not included in the list}
Instead, I get the following:
I dropped some logging into the
article.js
adapter, and I see that Ember is passingnull
into theid
argument forbuildURL
:Is this a change in behaviour with a new Ember Data version, or did I mess something up?
My RESTful instinct here tells me that one should
POST
new elements to a collection (e.g./friends/721/articles
), not an individual resource (friends/721/articles/1234
). (e.g. how is it even supposed to know it's own ID before it's created?)Version info: