@David I'm not an expert, but I looked at your question again, and I think in order to get the client_id associated with it, you have to call the JSON method in RestAdapter and pass it:
{associations: true}
Below are links explaining how to do this:
https://stackoverflow.com/questions/10184213/is-there-a-way-to-post-embedded-objects-back-to-the-api-with-ember-data
Embedded Ember data objects stored as separate objects
Emberjs - unable to request inline model or association
Update
Before answering the question of where to use JSON in the code, I want to take one step back to something that I just watched with the design of your code.
You are trying to create a parent record in a child record because Client is a parent and project is a child. If you are observing well, issue-115 you contacted categorically states that parentRecord storage will be used to create the entry. Also, if you test the test in a balanced pull-request that has been merged in relation to issue-115 , you will see it again as Create a child entry in parentRecord .
But you do the opposite, that is, create parentRecord in the child entry . You need to undo this.
In addition, on the rails side , in the Client model, you call accepts_nested_attributes_for: projects , which, like emberjs, allows you to create recording projects from the client, and not vice versa. All examples of using accepts_nested_attributes_for in the rails , railscasts manual , and this is on the nested attributes , show the fields for the child model created from forms in the parent model.
Thus, both rails and emberjs are used in this case to create parentRecord from the child record. This may be the reason that you have a problem with the client ID. So cancel the design and try again. If it still does not send the client ID. Then you must call toJSON on the client model, which is the parent association, as shown in the first link , from the initial links that I wrote, recommending you name {association: true} on toJson in the restAdapter.
App.Client
Hope this helps. Please comment on what worked or didnโt work, so that others experience similar problems who find this post can know where to start.
Finally, this does not prevent you from creating rails api with the active_model_serializer gem , which is ember - the main team recommended gem to create rails api for the ember and RestAdapter data. Thus, you can move and insert associations from both the ember side and the rail side.