10 lines
288 B
Ruby
10 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
|