Skip to content

Commit

Permalink
Add count to categories on root (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdnbwmn committed Apr 27, 2018
1 parent 1415241 commit 7e344ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/documents/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<%= link_to root_path, class: 'link link--highlight link--highlighted pl2 pr2 pts pbs block' do %>
<div class="grid-row">
<span class="grid-column ellipsis pr0">All</span>
<span class="grid-column span-3 align--right pl0">22</span>
<span class="grid-column span-3 align--right pl0"><%= @documents.count %></span>
</div>
<% end %>
</li>
Expand All @@ -25,7 +25,7 @@
<%= link_to category_path(category), class: 'link link--highlight pl2 pr2 pts pbs block' do %>
<div class="grid-row">
<span class="grid-column ellipsis pr0"><%= category.name %></span>
<span class="grid-column span-3 align--right pl0">#</span>
<span class="grid-column span-3 align--right pl0"><%= category.documents.where(user_id: current_user).count %></span>
</div>
<% end %>
</li>
Expand Down

0 comments on commit 7e344ea

Please sign in to comment.