Skip to content

limerentfox/rails-form_tag-lab-web-1116

 
 

Repository files navigation

Rails form_tag Lab

Objectives

  1. Build a functional Rails form using a form_tag

  2. Pass a route helper as the argument to a form_tag

  3. Pass an options hash with a method to a form_tag

  4. Use a text_field_tag and other form controls to create inputs

  5. Build a new action that renders a form that submits to the create action

Instructions

The two specs for this lab that are currently failing are located within the form page feature in specs/features/student_spec.rb.

At a high level, you need to build a form to create a new student, 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 and create route for the students resource

  • Print out the student value to the view template page

Keys to remember

  • Look at the tests to see which field values you should be using

  • Make sure to use the form_tag helpers

Resources

View Rails form_tag Lab on Learn.co and start learning to code for free.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 81.1%
  • HTML 15.1%
  • CSS 1.9%
  • JavaScript 1.9%