debian-mirror-gitlab/app/models/projects/topic.rb
2021-11-11 11:23:49 +05:30

11 lines
288 B
Ruby

# frozen_string_literal: true
module Projects
class Topic < ApplicationRecord
validates :name, presence: true, uniqueness: true, length: { maximum: 255 }
has_many :project_topics, class_name: 'Projects::ProjectTopic'
has_many :projects, through: :project_topics
end
end