Stuck on the “saving data” rails lesson: https://www.codecademy.com/courses/learn-rails/lessons/one-model/exercises/one-model-create-messages-i
I’m new to coding and confused by the intro to rails lesson. I’m plugging in the data that the lessons tell me to plug in but they don’t seem to adequately explain to me what exactly I’m doing.
On step 5, the lesson tells us to paste the following into an erb file:
<%= form_for(@message) do |f| %>
<%= f.text_area :content %>
I was confused as to how exactly this works, as “form_tag” doesn’t get explained very well. What exactly does F represent? It isn’t an instance of message. When I looked at the migration file to see what messages are composed of, text_area and label aren’t listed, so that couldn’t make sense. I’m guessing is maybe they’re HTML stuff? But I’m not sure why that would be called within % brackets. Maybe it’s something built into rails? I can’t find those words anywhere else in the lesson, so I’m not sure what meaning is assigned to them. I mean, this is the problem. A lot of the steps feel very arbitrary. How am I supposed to grasp how these things work if the specifics are never explained?