Listing Categories

<% Category.new.domains.each do |key, domain| %>

<%=h domain %>

<% @categories.each do |category| %> <% if category.domain == key %> <% end %> <% end %>
Name
<%=h category.name %> <%= link_to icon('chevron-up'), controller: :categories, action: "up", id: category.id %> <%= link_to icon('chevron-down'), controller: :categories, action: "down", id: category.id %> <%= link_to icon('pencil'), edit_category_path(category) %> <%= link_to icon('times'), category, :confirm => 'Are you sure?', :method => :delete %>
<% end %> <%= link_to 'New Category', new_category_path, class: 'button' %>