Hello everybody, im just newbie at phoenix, im trying to build a trello clone and decided to do the backend using phoenix for training and fun, actually i follow this tutorial to do the user part:
Thats okay and it is working, so i created the context of item, and add the board,list and will do cards, but my question for now is how can i use the current user id and add it to the board when being created?
From the outline you described I’d say that you can obtain the current user id from the session when POSTing to the BoardController.
In there, I assume you’ll call a function inside the Board context to create a new Board.
Pass the current user id as a parameter to the create function. Which in turn will create the association.
Hey man, yeah i can i do it to, didnt think about it, btw thanks for the tutorial and also for updating it, really helped me, thanks for the answer too