forest-rails
forest-rails copied to clipboard
[*] Smart Views - Smart views can access nested relationship
Pull Request checklist:
- [X] Write an explicit title for the Pull Request
- [X] Write changes made in the CHANGELOG.md
- [ ] Create automatic tests
- [ ] No automatic tests failures
- [X] Test manually the implemented changes
- [X] Review my own code (indentation, syntax, style, simplicity, readability)
- [ ] Wonder if you can improve the existing code
To add more context about how JSON API works:
First thing we need to know is that if in a relationships, there is a link specified even if the data are retrieved in the included, Ember Data will do a GET request on the url. So link must be here ONLY if the data is not included. Then where there is data in relationships { data: { id: '1', type: 'student'}} and a link the data will always be the first one to be called. If none of them is specified, the relation is considered as null.
Let's keep this for later. We need stability now and I don't want to introduce unecessary feature. Especially on the liana side.