mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-07-14 22:24:36 +08:00
change pr
This commit is contained in:
@@ -3,8 +3,13 @@ class PullRequest < ApplicationRecord
|
||||
belongs_to :issue
|
||||
belongs_to :user
|
||||
belongs_to :project, :counter_cache => true
|
||||
# belongs_to :fork_project, foreign_key: :fork_project_id
|
||||
has_many :pull_request_assigns, foreign_key: :pull_request_id
|
||||
has_many :pull_request_tags, foreign_key: :pull_request_id
|
||||
has_many :project_trends, as: :trend, dependent: :destroy
|
||||
has_many :attachments, as: :container, dependent: :destroy
|
||||
|
||||
def fork_project
|
||||
Project.find_by(id: self.fork_project_id)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user