<%= nested_li(@categories) do |c| %>
  <%= link_to c.title, refinery.products_category_path(c.nested_url) %>
  <% if c.leaf?%>
    <ul>
      <% c.products.each do |p| %>
        <li><%= link_to p.sku, refinery.products_product_path(p) %></li>
      <% end %>
    </ul>
  <% end %>
<% end %>
<%= nested_li(categories) do |c| %>
  <%= link_to c.title, refinery.products_category_path(c.nested_url) %>
  <% if c.leaf?%>
    <ul>
      <% c.products.each do |p| %>
        <li><%= link_to p.title, refinery.products_product_path(p) %></li>
      <% end %>
    </ul>
  <% end %>
<% end %>
Improve categories menu (use locals)
Improve categories menu (use locals)
