-
Build a functional Rails form using form_tag
-
Pass a route helper as the argument to form_tag
-
Pass an options hash with method to form_tag
-
Use text_field_tag and other form controls to create inputs.
-
Build a new action that renders a form that will submit to create
There are two specs for this lab that are currently failing that you need to take from red to green, the specs are located here: specs/features/student_spec.rb
and are in the feature form page
.
At a high level you need to build a form to create a new student and have the form redirect back to the new view template and print out the form params to the screen. Below are a few items to keep in mind:
-
Draw a
new
andcreate
route for thestudents
resource -
Print out the student value to the view template page
-
Look at the tests to see which field values you should be using
-
Make sure to use the form tag helpers
Reading Form Helper Documentation
View Rails form_tag Lab on Learn.co and start learning to code for free.