Permalink
Browse files

Count commits using SQL rather than Ruby for faster computation

  • Loading branch information...
Bounga committed Feb 7, 2018
1 parent c082d6f commit 6edef62bb8369930a2aa8f8566422f74296bef30
Showing with 1 addition and 1 deletion.
  1. +1 −1 apps/web/controllers/contributors/show.rb
@@ -9,7 +9,7 @@ def call(params)
@contributor = ContributorRepository.new.find_by_github(params[:id])
commits = CommitRepository.new.all_for_contributor(@contributor.id)
@commits_count = commits.to_a.size
@commits_count = commits.count
@commits = all_for_page(commits)
end
end

0 comments on commit 6edef62

Please sign in to comment.