Extra step 4 saving the relationship in the backend - Thewessen/tic-tac-toe_ruby_backend GitHub Wiki

Now for the really hard part! Saving this relationship when both models (the game and the nicknames) already excisted.

So far, the active_model_serializers did an awesome job serializing the data JSON:API conform. But no I needed a deserializer which the framework didn't had. In the end, I just deserialized the data by hand. Literally digging in the nested json object.

I learned alot about the params.require and params.permit. I'm really curious about how to work with these relationships. Maybe I should have used an other gem, like jsonapi-rb. But I didn't want to set up a different module only for this purpose.

With the relationship also saving in the backend, all the extra steps were finished.

My time for finishing this app is almost done, so I'm not starting something new. It's time for a cleanup and delivery.

⚠️ **GitHub.com Fallback** ⚠️