summaryrefslogtreecommitdiff
path: root/app/services/projects/forks_count_service.rb
blob: 3a0fa84b8685c9002fdba2779365b6f14156b21e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module Projects
  # Service class for getting and caching the number of forks of a project.
  class ForksCountService < CountService
    def relation_for_count
      @project.forks
    end

    def cache_key_name
      'forks_count'
    end
  end
end