For the ruby on rails guide, need help on understanding how the render works for partial -
I'm going through Ruby on Rail guide, but I saw something that I do not understand. In that section where you teach how to present a partial form for the comment section of the blog. For partial comments, he wrote
& lt; H2 & gt; Comments & lt; / H2 & gt;
But for the form they were used
& lt; H2 & gt; H2 & gt; & Lt;% = Render "Comments / Form"% & gt; Why is it that the first one was used and "/ comments" were not submitted
The difference here is, table entry from @ article.comments a @article , even then comments / form < / code> will be the file html.erb in the comments folder in _form.html.erb .
You can find different uses of render on the Rabin's page page.
Comments
Post a Comment