debian-mirror-gitlab/app/models/project_repository.rb

15 lines
283 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
2019-07-07 11:18:12 +05:30
class ProjectRepository < ApplicationRecord
2021-02-22 17:27:13 +05:30
include EachBatch
2019-02-15 15:39:39 +05:30
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