debian-mirror-gitlab/app/models/project_repository.rb
2019-02-15 15:39:39 +05:30

13 lines
264 B
Ruby

# frozen_string_literal: true
class ProjectRepository < ActiveRecord::Base
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