diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-03-15 16:18:44 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-03-28 14:58:35 +0300 |
commit | 1c3c7fb25d972fc19d5b4bb371cb21094d81e478 (patch) | |
tree | 1989aa0a7964ccdac4f6a6751f50967fe5fe801d /app/models/system_note_metadata.rb | |
parent | ad831ace7ed8d2ed999b15f8350aaa51f0490124 (diff) |
Add system_note_metadata model
Diffstat (limited to 'app/models/system_note_metadata.rb')
-rw-r--r-- | app/models/system_note_metadata.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/system_note_metadata.rb b/app/models/system_note_metadata.rb new file mode 100644 index 00000000000..e8d3600d341 --- /dev/null +++ b/app/models/system_note_metadata.rb @@ -0,0 +1,11 @@ +class SystemNoteMetadata < ActiveRecord::Base + ICON_TYPES = %w[ + commit merge confidentiality status label assignee cross_reference + title time_tracking branch milestone discussion task moved + ].freeze + + validates :note, presence: true + validates :icon, inclusion: ICON_TYPES, allow_nil: true + + belongs_to :note +end |