April 2018
Beginner to intermediate
406 pages
9h 33m
English
Now we need to devise a way to send the user ID of a logged-in user through the controller to the template and back again; this way, a user can be properly associated with every poll they create. To do this, we need to work with Phoenix's built-in session handling code. The good news is that getting data out of the session is just as easy as putting data into the session; essentially, the only difference is that we'll be calling get_session/2 instead of put_session/3.