I am doing the Jumpstart tutorial where you have to create a blog in ruby on rails. It is going fine but I have not managed to figure out one thing. The root page is supposed to show a list of articles. And it does. Only it also shows this extra bit: Article list and unwanted part at the bottom
The code I have in the view:
<h1> All Articles </h1>
<ul id="articles">
<%= @articles.each do |article| %>
<li>
<%= link_to article.title, article_path(article), class: 'article_title' %>
</li>
<% end %>
</ul>
<%= link_to "Create New Article", new_article_path, class: 'new_article' %>
And here is the relevant code in the controller
def index
@articles = Article.all
end
I would appreciate any help on why this is happening.