SHARE:
Uncategorized

Day 2: Switching to Form Tag From Form For

Flatiron School / 23 July 2013

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.

Starting My Own App Previous Post PhoneGap: Intro (Part 1) Next Post