abuiles / ember-cli-101-errata

18 stars 4 forks source link

Saving an Articles state: The backend rejected the commit because it was invalid: {state: is not included in the list} #212

Closed nshoes closed 9 years ago

nshoes commented 9 years ago

I have been banging my head on this for awhile. I can't save an Article's state attribute. I get this error message when saving:

The backend rejected the commit because it was invalid: {state: is not included in the list}

I tried to fix it, going back and reading over the setup of the Article carefully, and found nothing. If I comment out the attribute in models/article.js itself, it works! I can save it. I have no idea what's going on.

Here is my repo. Can anyone help?

Edit:

What's even MORE weird is that if I ping my friends api (I'm using Postman), even if I didn't set the state attribute, it shows as being 'barrowed'. Is your API setting it? Am I missing something reeeeally obvious? haha. Thanks in advance.

nshoes commented 9 years ago

A friendly redditor helped me out on this. The issue had to with me misspelling 'borrowers'.

abuiles commented 9 years ago

@nshoes sorry :), I was a bit busy, but I'm glad you got this sorted out. cheers!