Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-03-15 16:18:44 +0300
committerJarka Kadlecova <jarka@gitlab.com>2017-03-28 14:58:35 +0300
commit1c3c7fb25d972fc19d5b4bb371cb21094d81e478 (patch)
tree1989aa0a7964ccdac4f6a6751f50967fe5fe801d /app/models/system_note_metadata.rb
parentad831ace7ed8d2ed999b15f8350aaa51f0490124 (diff)
Add system_note_metadata model
Diffstat (limited to 'app/models/system_note_metadata.rb')
-rw-r--r--app/models/system_note_metadata.rb11
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