Day 2: Switching to Form Tag From Form For
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 […]
Reading Time 1 min
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.
Posted by Flatiron School / July 23, 2013
Learn to Code Python: Free Lesson for Beginners
What is the difference between a data analyst and a data scientist?
While data analyst and data scientist roles attract similar types of creative and logical people, their roles do have stark differences. Here’s our breakdown of the lines between these often mixed up roles.