mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-04 04:03:25 +08:00
新增: 项目搜索标签关联记录复合唯一验证
This commit is contained in:
@@ -19,4 +19,8 @@ class ProjectTopicRalate < ApplicationRecord
|
||||
belongs_to :project_topic, counter_cache: :projects_count
|
||||
belongs_to :project
|
||||
|
||||
|
||||
validates :project_id, uniqueness: { scope: :project_topic_id }
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user