Permalink
Browse files

Add commits count on user contributions page

  • Loading branch information...
Bounga committed Feb 6, 2018
1 parent 9b5ad4c commit c082d6fe6cf81a4e822ea2117e1744be671718b2
Showing with 6 additions and 3 deletions.
  1. +5 −2 apps/web/controllers/contributors/show.rb
  2. +1 −1 apps/web/templates/contributors/show.html.slim
@@ -3,11 +3,14 @@ class Show
include Web::Action
include Hanami::Pagination::Action
expose :contributor, :commits
expose :contributor, :commits, :commits_count
def call(params)
@contributor = ContributorRepository.new.find_by_github(params[:id])
@commits = all_for_page(CommitRepository.new.all_for_contributor(@contributor.id))
commits = CommitRepository.new.all_for_contributor(@contributor.id)
@commits_count = commits.to_a.size
@commits = all_for_page(commits)
end
end
end
@@ -1,5 +1,5 @@
h3
| All #{contributor.github} commits
| All #{contributor.github} commits (#{commits_count})
table.table.table-hover
- commits.each do |commit|

0 comments on commit c082d6f

Please sign in to comment.