I’m currently reading Beginning Rails 3. I’m coming from PHP and trying to learn Ruby and Rails. I’m looking at a _form partial and I have a few questions. Specifically about the line:
<%= form_for(@article) do |f| %>
What is the purpose of having the @article object in there as well as what is the function of variable f?
thanks,
mike
form_foraccepts a model so that it can do a few things for you under the covers:If you just want the tag helpers, there’s also
form_tagand friends