<% contents.each_with_index do |child_category, i| %>
  <section class="category-detail">
    <%= heading_tag child_category.title,
                    level: 2,
                    id:    child_category.id,
                    class: 'category-detail__heading' %>

    <p><%= child_category.description %></p>

    <% if child_category.contents.present? %>
      <div class="category-detail__list-container">
        <%= render 'content_items', contents: child_category.contents %>
      </div>
    <% end %>
  </section>
<% end %>

<% contents.each_with_index do |child_category, i| %>
  <section class="category-detail">
    <%= heading_tag child_category.title,
                    level: 2,
                    id:    child_category.id,
                    class: 'category-detail__heading' %>

    <p><%= child_category.description %></p>

    <% if child_category.contents.present? %>
      <div class="category-detail__list-container">
        <%= render 'content_items', contents: child_category.contents %>
        <p class="category-detail__view-all js-category-detail__view-all">View all ..</p>
      </div>
    <% end %>
  </section>
<% end %>

Add view all paragraph to child categories
Add view all paragraph to child categories
