Answer the question
In order to leave comments, you need to log in
How does form_for work for linked models?
Newbie on rails. Explain how form_for works in this case?
<%= form_for([@post, @post.comments.build]) do |c| %>
@post
? Why @post.comments.build?
@post
is it taken from the controller when the submit button is clicked? Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question