mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 11:50:49 +08:00
init project
This commit is contained in:
12
app/models/repository.rb
Normal file
12
app/models/repository.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class Repository < ApplicationRecord
|
||||
self.inheritance_column = nil # FIX The single-table inheritance mechanism failed
|
||||
belongs_to :project, :touch => true
|
||||
belongs_to :user
|
||||
has_many :version_releases, dependent: :destroy
|
||||
|
||||
validates :identifier, presence: true
|
||||
|
||||
def to_param
|
||||
self.identifier.parameterize
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user