gitlab-org--gitlab-foss/app/models/system_note_metadata.rb

12 lines
348 B
Ruby
Raw Normal View History

2017-03-15 13:18:44 +00:00
class SystemNoteMetadata < ActiveRecord::Base
ICON_TYPES = %w[
commit merge confidential visible label assignee cross_reference
title time_tracking branch milestone discussion task moved opened closed merged
2017-03-15 13:18:44 +00:00
].freeze
validates :note, presence: true
validates :action, inclusion: ICON_TYPES, allow_nil: true
2017-03-15 13:18:44 +00:00
belongs_to :note
end