The DMV is notorious for making you fill out numerous forms. You are going to recreate that hellish process for users of the California DMV's web application.
- Write a route handler for GET requests made to
"/first_form". Make this route render a template calledfirst_form.erb. - Within
first_form.erb, make a form. Make the form POST to"/first_form".
- give the form inputs for the user to enter their name and drivers license ID number
- Write a route handler for POST requests made to
"/first_form".
- put a binding.pry in the route handler and use redis's
hmsetmethod to persist a hash calleduser, and persist the user's name and drivers license ID number. - you can use redis's
hgetallmethod to make sure that your info has been persisted, then redirect to"/second_form"
- Write a route handler for GET requests made to
"/second_form". Make this route render a template calledsecond_form.erb. - Within
second_form.erb, make a form that POSTs to"/second_form".
- give the form two inputs: one for the user's date of birth and the other for the user's sex.
- Write a route handler for POST requests made to
"/second_form".
- make the route handler persist the user's date of birth and sex, then have it redirect to
"/third_form"
- Write a route handler for GET requests made to
"/third_form". Make this route render a template calledthird_form.erb. - Within
third_form.erb, make a form that POSTs to"/third_form".
- give the form three inputs: one for the user's height and the other for the user's weight.
- Write a route handler for POST requests made to
"/third_form".
- make the route handler persist the user's height and weight, then have it redirect to
"/waiting_line"
- Write a route handler for GET requests made to
"/waiting_line". Make this route render a template calledwaiting_line.erb. - Make the
waiting_line.erbtemplate tell the user that they are in line and will be seen anywhere between the next 2 to 6 hours.