Answer the question
In order to leave comments, you need to log in
Why are there extra lines in the view when using the .each method?
Reading the Rails documentation. There is an example of displaying all articles on the page. For this, the following code is used:
<% @articles.each do |article| %>
<tr>
<td><%= article.title %></td>
<td><%= article.text %></td>
</tr>
<% end %>
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