<p style="color: green"><%= notice %></p>

<% content_for :title, "Categories" %>

<h1>Categories</h1>

<div id="categories">
  <% @categories.each do |category| %>
    <%= render partial: "category", locals: {category: category, products: category.products} %>
    <p>
      <%= link_to "Show this category", category %>
    </p>
  <% end %>
</div>

<%= link_to "New category", new_category_path %>
