Day 2: Switching to Form Tag From Form For

You’re closer than you think to a career in tech. Our grads have launched rewarding new careers — you can too.

View Our Jobs Report

The following is a guest post by Steven Brooks and originally appeared on his blog**.** Steven is currently a student at The Flatiron School. You can follow him on Twitter here.

So last night I was able to get about an hour of work in. I feel like that a sustainable pace considering I do not want to have energy taken away from my Library group project.

Anyway I feel very strong with form now. Yesterday, I was doing some work with my form with one of our TA’s, Jeff, who recommended I back down from form_for and move to form_tag. That worked wonders as there is far less rails magic involved in form_tag, and I also am literally only going to have one form for the user to input data for multiple objects.

Form_tag was much easier for me for many reasons. First, I was able to create to params hash the exact way I wanted to. This made it very easy for me to locate the the proper information in the controller and add that information into different instance variable. That process was repetitive, which I enjoyed because I feel I made large strides yesterday as far as the M and C of the MVC model goes.

I also was able to add sets to lifts(which is a joins table between routine and exercises). Now each lift has many sets which include repetitions and weights.

Headshot of Flatiron School

Flatiron School

Blog Post Author

Read More Flatiron School Articles

Since we opened our doors in 2012, thousands of students have joined Flatiron School to launch new careers in tech.

Explore our Courses

Find the perfect course for you across our in-person and online programs designed to power your career change.

Explore Our Courses
Join a Community

Connect with students and staff at meetups, lectures, and demos – on campus and online.

Join the Community
Schedule a Chat

Have a question about our programs? Our admissions team is here to help.

Schedule a Chat