gitlab-org--gitlab-foss/app/models/system_note_metadata.rb
2017-09-14 14:50:32 +02:00

13 lines
403 B
Ruby

class SystemNoteMetadata < ActiveRecord::Base
ICON_TYPES = %w[
commit description merge confidential visible label assignee cross_reference
title time_tracking branch milestone discussion task moved
opened closed merged duplicate locked unlocked
outdated
].freeze
validates :note, presence: true
validates :action, inclusion: ICON_TYPES, allow_nil: true
belongs_to :note
end