debian-mirror-gitlab/app/models/projects/topic.rb

11 lines
288 B
Ruby
Raw Normal View History

2021-11-11 11:23:49 +05:30
# 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