summaryrefslogtreecommitdiff
path: root/app/models/projects/topic.rb
blob: a17aa550edb7637af0a1725c72a844f6fd51e4c6 (plain)
1
2
3
4
5
6
7
8
9
10
# 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