Example: My rails API provides a json with attributes username, image and email. I do not want the email to be public so that everyone can use my API and get users email addresses, but I want a user to be able to change their email.
The best solution for this (in a rails way) would be that ‘api/users/:id.json’ returns username and image and ‘api/users/:id/edit.json’ returns username, image and email. That’s at least how I had done if this was just a rails app.
How do I solve this in ember? I could create a UserBase model (username, email) and a UserDetails model (email) that’s extends from UserBase but further than that have I don’t come.
In the users edit route how can I specify so that UserDetails model is used? And how can I tell ember-data to find the user through ‘api/users/:id/edit.json’? I want to find the user through ‘api/users/:id/edit.json’ so I can check backend so current user has permission to read that data.
My English is not the best but I hope you understand how I think and what I want to do, thanks!