summaryrefslogtreecommitdiff
path: root/app/models/project_repository.rb
blob: a9cef16f3ac1e57b82f49aa57be6c6b6b5a56df6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class ProjectRepository < ApplicationRecord
  include EachBatch
  include Shardable

  belongs_to :project, inverse_of: :project_repository

  class << self
    def find_project(disk_path)
      find_by(disk_path: disk_path)&.project
    end
  end
end