We have a nice new (well, okay, it's not that nice, but it is functional at least) interface for displaying our polls, but if we always have to go into an IEx terminal to create new polls it probably won't pick up in usage very quickly! Instead, we need to provide the users of the site with a simple web interface that they can use to create their own polls on demand! We'll do something very simple for our interface:
We'll also need to create two new actions in our controller to dictate the flow of new data into our database: new and create. The job of the new action is to set up the starting point of data that our form is going to work with, and create will handle actually creating the data and send some result of posting the form back to the end user! We should end up with a flow that looks like this:
We'll need to understand a little...