Got stuck on creating new sighting with several errors.
First one “this.get() is not a function” appears as soon as I enter /sightings/new
After entering info and pressing button to create new sighting I get an 500 error.
After digging deeper, it seems that there is a problem with my request, payload looks like this: {"data":{"attributes":{"location":"twst","created-at":null,"sighted-at":null},"type":"sightings"}}
If we check it in Ember (Chrome plugin) it looks like id is null, and dates are null
For some reason, I can’t see Cryptids and I am choosing a blank (guess the payload error and this one might be connected)
Ok, the 3rd issue (blank cryptid list) is solved
in templates/sightings/new.hbs {{#x-option value=cryptid}}{{cryptid-name}}{{/x-option}}
should be {{#x-option value=cryptid}}{{cryptid.name}}{{/x-option}}
a dot instead of a hyphen in cryptid name
1st issue (this.get(…) is not a function)
can be fixed changing x-option to xs.option (Install EmberX-Select p.437 can be checked here) if you are using ^3.0.0 x-select that is
Who can check this?
This is my request via app: {"data":{"attributes":{"location":"twst","created-at":null,"sighted-at":null},"type":"sightings"}}
response: 500 internal server error
I think the problem is caused by x-select. After version 3.0.0, x-select has some problems assigning the value in template directly to the model. Maybe you can try what tgandee said, use action instead of value to assign the value: Install EmberX-Select p.437, just like this: